Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Looking to do the following but cant quite get it right.
Player_ID,
If ( Score >= 100 ), 'Expert','Novice' as Skill_Level //If score or points greater than 100 then 'Expert' otherwise novice
Then in the front end I have a set analysis expression which counts no of players based on this field
=Num(COUNT({<Skill_Level ={'Expert'},DISTINCT Player_ID)
What I want is a variable driven user input box which allows the user to enter a value for the 'score' and for the set analysis to update given this value.
create an input box. populate it with a variable 'vScore'
change your set expression for experts:
=Num(COUNT({<Skill_Level ={">=$(=vScore)}>"},DISTINCT Player_ID)
for novice:
=Num(COUNT({<Skill_Level ={"<$(=vScore)}>"},DISTINCT Player_ID)
May need to play with it incase I made a syntax error but it should work. The point is you can use less than or greater than a variable within the set analysis itself.
Your other methods is not going to work because you're using a variable calculated at script level. It needs to be calculated dynamically by the expression according to the user inputted variable value.
You may create 2 variable as shown below and use vVar2 in your expression.
Thanks - what about the set analysis expression ?
A little tweak in variable:
Dimension & Expressions:
sorry it's score rather than skill_level field but same thing