Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
let's take the data set below (loaded to qlik):
date | hour | account | sales |
8/2/2017 | 1 | xx | $20 |
8/2/2017 | 2 | xx | $25 |
8/2/2017 | 3 | xx | $18 |
8/2/2017 | 1 | yy | $30 |
8/2/2017 | 2 | yy | $12 |
8/2/2017 | 3 | yy | $8 |
8/3/2017 | 1 | xx | $13 |
8/3/2017 | 2 | xx | $7 |
8/3/2017 | 3 | xx | $22 |
8/3/2017 | 1 | yy | $3 |
8/3/2017 | 2 | yy | $17 |
8/3/2017 | 3 | yy | $10 |
i would like to create a chart and receive for each account the most succeeding sales hour:
account | hour |
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
This expression works for me (account is table dimenision)
FirstSortedValue(hour, aggr(sum(-sales),hour,account))
This expression works for me (account is table dimenision)
FirstSortedValue(hour, aggr(sum(-sales),hour,account))
PFA
Perfect!