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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
domiho123
Partner - Contributor II
Partner - Contributor II

issue with set analysis

Attached example shows my problem with set analysis.

Basically, the expression

=MaxString({<cost = {"$(=Max(cost))"}>} office)

is not returning the expected value. It seems that in the straight table the dimension 'customer'  is not taken into account.

Please advice.

Dominique.

Labels (1)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You cannot use Set Analysis for this.

Instead, use

=Only(Aggr(If(cost=Max(total <customer> cost),office),customer, office))

HIC

View solution in original post

3 Replies
hic
Former Employee
Former Employee

You cannot use Set Analysis for this.

Instead, use

=Only(Aggr(If(cost=Max(total <customer> cost),office),customer, office))

HIC

swuehl
Champion III
Champion III

In your specific setting, also this may work:

=FirstSortedValue(office, -cost)



domiho123
Partner - Contributor II
Partner - Contributor II
Author

Thank you both for your swift help. Both solutions work and give me a better insight in how to this in the future.

The best,

Dominique