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:
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!
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:
Create an aggregated measure from this parameter:
Here used in a report:
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:
Create an aggregated measure from this parameter:
Here used in a report:
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 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.