BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MClay
Fluorite | Level 6

Hello! I am using SAS VA 7.5. I would like to calculate percent of total for quarter and display results in a bar graph to see change over time. Below is an example of how my data are structured and an example of the desired graph. The category=year and lattice columns=quarter. 

 

QVar1
Q10
Q11
Q10
Q10
Q20
Q21
Q21
Q20
Q30
Q31
Q31
Q31

POQ test.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

So I would like to visualize Var1 going from 25% to 50% to 75% over Qs 1-3. I experimented with right-clicking the variable, creating new calculation, and percent of total but this, of course, used all data and didn't segment by quarter. I have also tried creating a new calculated variable from the data pane and creating an aggregated measure but it was incorrect.  

 

I'm also curious what dates VA uses for it's preset quarters in aggregations. I need to use non-standard dates (e.g. Q1=Oct-Dec) which should factor into the calculation. 

 

Any suggestions are appreciated, thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
KeithM
SAS Employee

Try creating an aggregated measure that looks like the following:

 

sum(_bygroup_(Var0))/sum(_ForAll_(Var0))

View solution in original post

2 REPLIES 2
KeithM
SAS Employee

Try creating an aggregated measure that looks like the following:

 

sum(_bygroup_(Var0))/sum(_ForAll_(Var0))

MClay
Fluorite | Level 6
That worked perfectly, thank you!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 2 replies
  • 931 views
  • 0 likes
  • 2 in conversation