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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

show dimension for max value

Hi,

I'm trying to show in a text object the field value for the corresponding max value of a calculation.

I'm calculating the total incoming values by TransactionHour, and want to show theTransactionHour that is the maximum.

2015-06-20_17-35-29.jpg

I've tried variants of firstsortedvalue and max(aggr(sum())), but i can't seem to return theTransactionHour for the max value.

I know I've done this before, but maybe I've been staring at it too long

Richard

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try something like

=FirstSortedValue( TransactionHour, -aggr( sum(PC.IN), TransactionHour) )

View solution in original post

5 Replies
swuehl
MVP
MVP

Try something like

=FirstSortedValue( TransactionHour, -aggr( sum(PC.IN), TransactionHour) )

MarcoWedel

Hi,

one solution could be:

QlikCommunity_Thread_169286_Pic2.JPG

QlikCommunity_Thread_169286_Pic1.JPG

hope this helps

regards

Marco

Not applicable
Author

Thanks,

That was it

=FirstSortedValue( TransactionHour, -aggr( sum(PC.IN), TransactionHour) )

It turns out that was one of the expressions I tried, but had inadvertently excluded the data source by filtering, so it was returning '-' and i thought my expression was wrong...Time to take a break!

pratap6699
Creator
Creator

=FirstSortedValue( TransactionHour, aggr( sum(PC.IN), TransactionHour) )-----it shows 1st fieldvalue means accesnding order 1st value

=FirstSortedValue( TransactionHour, -aggr( sum(PC.IN), TransactionHour) )-----it shows max fieldvalue means decesnding order 1st value

Not applicable
Author

Hi, how would make sure that this set analysis ignores all other TransactionHour selections?