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

I am trying to create a histogram to show how the age distributions differ between customers in two groups, e.g. high and low probability of buying a product. Ideally, I want to use a slider to dynamically change the score cutoff, so that the user can see how the two distributions look for e.g. scores above\below 0.9, 0.5, etc. I have a more static HTML based report that illustrates the two different distribution, although for a fixed cutoff. Is there a way to create two groups based on a slider or other user input?

 

Skjermbilde.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Sam_SAS
SAS Employee

Hello,

 

Did you try creating a slider that filters the histogram? If you assign your score variable to the slider, it seems like this should give you the desired result.

 

Or did you want your group variable to be defined by the slider setting? This could be accomplished by assigning a parameter to the slider and then creating a calculated measure based on that parameter.

 

Let us know if that helps, or if I am misunderstanding what you want to do. If you could show a row or two of your data, that would help us understand.

 

Thanks,

Sam

View solution in original post

5 REPLIES 5
Sam_SAS
SAS Employee

Hello,

 

Did you try creating a slider that filters the histogram? If you assign your score variable to the slider, it seems like this should give you the desired result.

 

Or did you want your group variable to be defined by the slider setting? This could be accomplished by assigning a parameter to the slider and then creating a calculated measure based on that parameter.

 

Let us know if that helps, or if I am misunderstanding what you want to do. If you could show a row or two of your data, that would help us understand.

 

Thanks,

Sam

Ullsokk
Pyrite | Level 9
Yes, I want my group variable to be based on the slider setting.

Will try that out, thanks.
Ullsokk
Pyrite | Level 9

What would the calculated measure look like? 

 

I assume something like if parameter < slider value then group 1 else group 2, but I can't quite see how to write in in VA 

Ullsokk
Pyrite | Level 9

Figured it out:

The calculated item had to be 

IF ( 'Scorevariable'n >= 'cutoff parameter'p )
RETURN 1
ELSE 0

Sam_SAS
SAS Employee

Great! Thanks for following up with us. 🙂

 

The calculated expression syntax in VA is a bit unusual, but it can be very useful.

 

Sam

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 5 replies
  • 1069 views
  • 0 likes
  • 2 in conversation