BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
znhnm
Quartz | Level 8

Hello,

 

I’m trying to calculate the frequency percent for each category value dynamically using a button bar in SAS Visual Analytics. The "Automatic actions on all objects" option is enabled.

 

The "Total" (frequency of the group) updates when I select a different value in the button bar which is meaningful. However, the frequency percent for each category is displayed as 100% because, I think, the denominator is dynamic—it changes to match the total frequency of the selected group. What I’d like to achieve is:

  • Dynamic numerator: The total frequency of the selected group (based on the button bar selection).
  • Static denominator: The sum of all frequencies across the five groups (unchanged regardless of selection).

Could someone guide me on how to set up this calculation in SAS VA? I’ve included example screenshots to help illustrate the current issue, thank you!

 

znhnm_1-1736795135006.pngznhnm_2-1736795153906.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

Which version of SAS Visual Analytics do you have?


Beginning with 2024.05, parameters can be filled using an expression. By default this expression has no filters applied. So this allows to create the denominator value.
See more details here https://go.documentation.sas.com/doc/en/vacdc/v_029/vawn/p0er3ews3zq3oan1p19txuy3umhl.htm#p0nusc9g5i...

 

Here is an example expression to fill a parameter:

BrunoMueller_0-1737020958725.png

Create an aggregated measure from this parameter:

BrunoMueller_1-1737021035351.png

Here  used in a report:

BrunoMueller_3-1737021161761.png

 

 

View solution in original post

4 REPLIES 4
BrunoMueller
SAS Super FREQ

Which version of SAS Visual Analytics do you have?


Beginning with 2024.05, parameters can be filled using an expression. By default this expression has no filters applied. So this allows to create the denominator value.
See more details here https://go.documentation.sas.com/doc/en/vacdc/v_029/vawn/p0er3ews3zq3oan1p19txuy3umhl.htm#p0nusc9g5i...

 

Here is an example expression to fill a parameter:

BrunoMueller_0-1737020958725.png

Create an aggregated measure from this parameter:

BrunoMueller_1-1737021035351.png

Here  used in a report:

BrunoMueller_3-1737021161761.png

 

 

znhnm
Quartz | Level 8

Hi Bruno,

 

Thank you so much! Looks like I can create the parameter and the aggregated measure with the version I have but could you please explain me how you created "freq in percent" variable? Thank you again...

znhnm
Quartz | Level 8
Sorry, I was trying to delete my follow up question and mark your answer as the solution but instead I marked my question as the solution by mistake, and I don't think I can change that. Thanks for your reply, it was really helpful.
Tom
Super User Tom
Super User

@znhnm wrote:
Sorry, I was trying to delete my follow up question and mark your answer as the solution but instead I marked my question as the solution by mistake, and I don't think I can change that. Thanks for your reply, it was really helpful.

First unselect the response you currently have selected as the answer. Then you can pick a different response to set as the answer.  Then you could delete the other response if you wanted.  But why?  If it is because you figured it out why tell us so someone else reading this thread can learn.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Discussion stats
  • 4 replies
  • 2898 views
  • 1 like
  • 3 in conversation