Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Function or technique to find most successful dimension by measure - qlik sense

let's take the data set below (loaded to qlik):

  

datehouraccountsales
8/2/20171xx$20
8/2/20172xx$25
8/2/20173xx$18
8/2/20171yy$30
8/2/20172yy$12
8/2/20173yy$8
8/3/20171xx$13
8/3/20172xx$7
8/3/20173xx$22
8/3/20171yy$3
8/3/20172yy$17
8/3/20173yy$10

i would like to create a chart and receive for each account the most succeeding sales hour:

 

accounthour
       xx    3
yy    1

account xx most succeeding sales hour is 3, because $18+$22=$40, more than:

1: $20+$13=$33

2: $25+$7=$32

have any technique or function to receive such an output?

tnx!

Tal

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

This expression works for me (account is table dimenision)

FirstSortedValue(hour, aggr(sum(-sales),hour,account))

View solution in original post

3 Replies
Anonymous
Not applicable
Author

This expression works for me (account is table dimenision)

FirstSortedValue(hour, aggr(sum(-sales),hour,account))

ankur_abhishek
Contributor III
Contributor III

PFA

Anonymous
Not applicable
Author

Perfect!