BookmarkSubscribeRSS Feed
Filipvdr
Pyrite | Level 9

Hello all,

My dataset looks like the following:

DateValueYearValueYear-1
01/01/2014020
02/01/2014010
03/01/2014015
01/01/2015140
02/01/2015150
03/01/2015160

I have calculated in VA the cumulative period of ValueYear and ValueYear-1.

I want to plot this so I can easily compare this year, with the previous year.

Any suggestions?

Filip

5 REPLIES 5
PeterWijers
Lapis Lazuli | Level 10

Filip,

If you derive the year out of the dates (new calculated item), you can use this field in a bar-graph to stick the two bar together and compare them.

While changing the date format to monthday, you can create your barlabels with these in relation to the created year field.

If needed, I could prepare a sample for you.

Greetings

Filipvdr
Pyrite | Level 9

Hello Peter,

I'm trying to create the dateformat to monthday. Can I still have it like a datevariable?

I tried to calculate it and put in a character format but then the sorting is not correct anymore.

If you want, you can show me a sample.

Thanks,

Filip

Here is a sample of my data: Capture.JPG

PeterWijers
Lapis Lazuli | Level 10

Hello Filip,

You are right that this is not possible in one crosstable.  (Date format can not be changed in the way you/I want).

I am not shure about version 7  (I get it next month) but I Know there is a development request making the YTD not only depending on dates)

Lets see if it is in a next release.

For now, only option would be to put two tables besides each other if your dates are running equal in VA.  ( As far as I can see now.)

Other option is to prefix the data....

greetings

Filipvdr
Pyrite | Level 9

Hi Peter, thanks for your time

I got something, but i'ts not cumulative yet...

The NotYearRelated is calculated with an If statement: if CA (Y) <> 0 then return CA(Y) else return CA(Y-1)

Thanks again

Capture.JPG

PeterWijers
Lapis Lazuli | Level 10

Hi Filip,

nice work. I fixed it ones in the database :smileyblush:  to get this result.  (be aware it concerns financial period and not calendar periods)

pic2.png

Hopefully  this will be availeble in the next release.

Greetings and succes

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 2270 views
  • 0 likes
  • 2 in conversation