BookmarkSubscribeRSS Feed
Noel88
Obsidian | Level 7

In the post-COVID world a question that is regularly getting asked is what growth is occurring in numbers since (for all intents and purposes for work) March 2020.

What I need to be able to do in VA is create a table that has numbers at end of month February and calculate the difference between that and the latest month. We have a "month end" in the data set and I need to show all three items in a table - February numbers, latest month numbers and the calculated difference.

I've tried various combinations of setting up March by itself using filters and latest month as a calculated item and using Treat As to change to number and then rank but can't get this to work. I've tried in both a list table and a cross tab. 

Any help would be sorely appreciated.

  Always the latest month 
    
    
CenterFebruaryJulyGrowth
A310045661466
B28283772944
C286839441076
D5931259666
E11041242138
Total10493147834290
1 REPLY 1
FredrikE
Rhodochrosite | Level 12
Hi!
Maybe you can achieve this by createing three new measures, one for february, one for the latest month and one for the difference.
Depending on how your months are formatted you have to define your formula, but something like this:

Feb: IF dateFromMDY(month(datepart(now())),1,YEAR(datepart(now()))) = 01FEB2020 return VALUE ELSE missing
Curr: IF dateFromMDY(month(datepart(now())),1,YEAR(datepart(now()))) = DATEOFMONTH return VALUE ELSE missing
Growth: Curr - Feb

Might help you 🙂

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 398 views
  • 0 likes
  • 2 in conversation