Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi,
I Have a expression as below in straight table.
Count(Distinct(ID)) & ' '& NUM(Count(Distinct(ID))/COUNT(TOTAL DISTINCT ID),'#,##0.00%')
Could anyone let me know how can I change the expression to get MAX ID. I used below one
Count(Distinct MAX(ID)) & ' '& NUM(Count(Distinct MAX (ID))/COUNT(TOTAL DISTINCT MAX (ID),'#,##0.00%')
But this is showing 'Error in Expression'.
Thanks.
 
					
				
		
will this work?
Count(Distinct MAX(ID)) & ' '& NUM(Count(Distinct MAX (ID))/COUNT(TOTAL DISTINCT MAX (ID),'#,##0.00%')
 
					
				
		
 manideep78
		
			manideep78
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can you please try the below expression
=Count({<ID={"$(=Max(ID))"}>}Distinct ID)&' '& Num(Count({<ID={"$(=Max(ID))"}>}Distinct ID)/Count({<ID={"$(=Max(ID))"}>}TOTAL ID),'#,##0.00%')
Hope this helps
Regards
Manideep
 
					
				
		
 sujeetsingh
		
			sujeetsingh
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can not use Max in count i think.
you can try Set analysis or variable as
vMaxID=MAX(ID)
and then use this variable in count function
 
					
				
		
Thanks
Actually I have two dimensions
Persons and Team
when I used the above expression it is showing only one person and one team and the count of that person and team.
It is not showing all dimension values. Do I need to change anything here?
 
 
					
				
		
Then what is the solution for this?
 
					
				
		
Could you post the sample data and the expected results?
 
					
				
		
 manideep78
		
			manideep78
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this for above result
=Count({<ID={"=Max(ID)"}>}Distinct ID)&' '& Num(Count({<ID={"=Max(ID)"}>}Distinct ID)/Count({<ID={"=Max(ID)"}>}TOTAL ID),'#,##0.00%')
Regards
Manideep
 MK_QSL
		
			MK_QSL
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Count(Distinct Aggr(MAX(ID),Persons, Team)) & ' '& NUM(Count(Distinct Aggr(MAX (ID),Persons, Team))/COUNT(TOTAL DISTINCT Aggr(MAX (ID),Persons, Team),'#,##0.00%')
 
					
				
		
Thanks and it is showing correct values only for one person and all the remaining it is showing incorrect values.
