Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
robertsb41
Contributor III
Contributor III

Dimension Expression

I have a selection made for Company, let's say Company A.  I need an expression for a dimension that displays Company based on the Job and Rank.  If Company A was rank 1 and Company B was rank 2, I need to show Company B.  If Company C was rank 1 and Company A was rank 2 then I need to display Company A.  I've been at this for hours and cannot figure it out.  Thanks.

Job Company Rank Low_Company
1 A 1 B
1 B 2  
1 C 3  
1 D 4  
2 C 1 A
2 A 2  
2 B 3  
2 D 4  
Labels (2)
1 Reply
robertsb41
Contributor III
Contributor III
Author

=if([Rank]>=2, sum(total <[Job]>{<[Rank]={1}>}Amount), sum(total <[Job]>{<[Rank]={2}>}Amount))

This works if I'm trying to do the same thing with a measure like [Amount] but I'm trying to do this for Company which is a dimension.  I'm starting to think it isn't possible.