Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 florianrathgebe
		
			florianrathgebe
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear All,
I have got a problem. Hope you can help me. I would like to have TextBox showing the value of the most counted KEYUSER_NAME. In this case "Keyuser A". If I only set "=KEYUSER_NAME" the field is null, because there is one "Keyuser B" within.
CostCenter  USERID  Benutzername KEYUSER_NAME
ABC1  ID000100 User A  Keyuser A
ABC1  ID000101 User B  Keyuser A
ABC1  ID000102 User C  Keyuser A
ABC1  ID000103 User D  Keyuser A
ABC1  ID000104 User E  Keyuser A
ABC1  ID000105 User F  Keyuser A
ABC1  ID000106 User G  Keyuser A
ABC1  ID000107 User H  Keyuser B
ABC1  ID000108 User I  Keyuser A
Does anyone has a solution for this?
If there are any questions, don't hesitate to contact me.
Best regards,
Florian
 florianrathgebe
		
			florianrathgebe
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear All,
I have figured it out.
I had to modify the answer from Agigliotti a bit. Thank you for the hint in the right direction.
The Solution is:
=FirstSortedValue( KEYUSER_NAME, -Aggr( Count(KEY_KEYUSER), KEY_KEYUSER ) )
Best regards,
Florian
 anushree1
		
			anushree1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Please check if the attachment helps
Code Used:
Total Count: =count(Keyuser)
Count of KeyUser A: ==count({<Keyuser={'Keyuser A'}>}Keyuser)
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try like:
= 'Most counted key user is : ' &
=Only({<KEYUSER_NAME={"=Rank(Count(KEYUSER_NAME))=1"}>}KEYUSER_NAME)
 
					
				
		
 agigliotti
		
			agigliotti
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 florianrathgebe
		
			florianrathgebe
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear all,
thank you for the help, but unfortunately it does not work. I have created a Qlikview-file. With fictive data, but with the correct structure of the relevant fields of the tables.
Best regards,
Florian
 anushree1
		
			anushree1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Could you tell us what is the desired output here?
 florianrathgebe
		
			florianrathgebe
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear Anushree,
for sure. I would like to have the KEYUSER_NAME which has the most counts for the selected data.
As example: the COSTCENTER "ABC193" has got 9 Users. For 8 of them "Name07" is the KEYUSER, for 1 it is "Name03". The texbox should show me in this example"Name07".
Best regards,
Florian
 florianrathgebe
		
			florianrathgebe
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dear All,
I have figured it out.
I had to modify the answer from Agigliotti a bit. Thank you for the hint in the right direction.
The Solution is:
=FirstSortedValue( KEYUSER_NAME, -Aggr( Count(KEY_KEYUSER), KEY_KEYUSER ) )
Best regards,
Florian
