Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 abe786
		
			abe786
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Is it possible to limit output of p() function to dimension value for which the expression is displayed ?
Please refer to attached code, what I'm trying to do is build a set analysis such that I get possible values using the dimension as a filter for each row of expression. In my case, I get correct output if I select the person value in list box, however when no person is selected the possible function returns all possible values including those for other dimension.
If expression way is not possible to do, please suggest if I can get required output by modifying the data model in some way ?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The problem is that the set analysis is evaluated once per chart and when nothing is selected, both products are possible and it displays it for both the Persons. In order to do it on the row level, you can consider using if statement
sum(if(Product = Person_Product, value)) 
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		The problem is that the set analysis is evaluated once per chart and when nothing is selected, both products are possible and it displays it for both the Persons. In order to do it on the row level, you can consider using if statement
sum(if(Product = Person_Product, value)) 
 abe786
		
			abe786
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Wow, didn't know you could place if clause in aggregation field.
Thanks the solution works perfectly.
