Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 egbert_jones
		
			egbert_jones
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 acsaggar
		
			acsaggar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 
					
				
		
 neelamsaroha157
		
			neelamsaroha157
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You may create 2 variable as shown below and use vVar2 in your expression.
 egbert_jones
		
			egbert_jones
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks - what about the set analysis expression ?
 
					
				
		
 neelamsaroha157
		
			neelamsaroha157
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		A little tweak in variable:
Dimension & Expressions:
 acsaggar
		
			acsaggar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		sorry it's score rather than skill_level field but same thing
