Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 venky77777
		
			venky77777
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Can any one help me why I'm not getting count(customer id) in qliksense table using 'if' condition. Please see the below data in table:
Thanks
 Vegar
		
			Vegar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		TRy to change the totaling on the measures from "Auto" to "Sum" in the property pane.
 Vegar
		
			Vegar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In the KPI object you don't have the CID dimension to split the expression over.
You will need to calculate the if statement per CID dimension value and then sum all those result. You can do that by wrapping sum(aggr(..., CID)) around you expression, like this:
sum(aggr( if(sum(GROSS)<sum(NET),count(CID)), CID))
 Vegar
		
			Vegar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It looks like you are getting values when using if statements in your chart.
Please point out whats wrong and explain your expected output.
 Vegar
		
			Vegar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is it the CID =109 that is causing you trouble? I notice that sum(NET) = sum(GROSS) and none of your if statement cover that scenario. You are only using larger or smaller than.
 venky77777
		
			venky77777
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I want total as 8 in "if(sum(GROSS)<sum(NET),count(CID))" column and 2 as total in "if((GROSS)>=(NET),count(CID))"
 Vegar
		
			Vegar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		TRy to change the totaling on the measures from "Auto" to "Sum" in the property pane.
 venky77777
		
			venky77777
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 Vegar
		
			Vegar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In the KPI object you don't have the CID dimension to split the expression over.
You will need to calculate the if statement per CID dimension value and then sum all those result. You can do that by wrapping sum(aggr(..., CID)) around you expression, like this:
sum(aggr( if(sum(GROSS)<sum(NET),count(CID)), CID))
 venky77777
		
			venky77777
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks @Vegar , it's working.
