Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

cancel
Showing results for 
Search instead for 
Did you mean: 
gameoverzx
Partner
Partner

Get Dimension with Highest Value

Hi,

I want to show the date with has the highest total sum of amount in a KPI , does anyone know how.

Amount     Date

113-06-18
213-06-18
17713-06-18
7813-06-18
213-06-18
2213-06-18
18413-06-18
479513-06-18
913-06-18
1275413-06-18
913-06-18
26189013-06-18
23213-06-18
10913-06-18
33713-06-18
12413-06-18
112-06-18
212-06-18
17712-06-18
7812-06-18
212-06-18
2212-06-18
18412-06-18
476312-06-18
912-06-18
1275212-06-18
912-06-18
26113612-06-18
23212-06-18
10912-06-18
33712-06-18
11412-06-18
106-06-18
206-06-18
17606-06-18
7806-06-18
206-06-18
2106-06-18
18106-06-18
462306-06-18
806-06-18
1272506-06-18
906-06-18
24079406-06-18
22906-06-18
10706-06-18
33606-06-18
11306-06-18
108-06-18
208-06-18
17608-06-18

Thanks

1 Solution

Accepted Solutions
sunny_talwar

May be this

FirstSortedValue(Date, -Aggr(Sum(Amount), Date))


Capture.PNG

View solution in original post

5 Replies
ogautier62
Specialist II
Specialist II

Hi,

create a sheet with Date in dimension,

and in expression :

if(sum(kpi) = max(total aggr(nodistinct sum(kpi),date)),date)

date with the max sum kpi will appear

regards

sunny_talwar

May be this

FirstSortedValue(Date, -Aggr(Sum(Amount), Date))


Capture.PNG

gameoverzx
Partner
Partner
Author

Thanks, have previously seen your answer elsewhere and tried it.

Realized that my output was not in date format.

Total carelessness on my side.

ogautier62
Specialist II
Specialist II

Yes!!!!

I made a copy paste of your text

Replace And with, (comma)

And Maxstring in place of max for a string

Naushad07
Contributor III
Contributor III

I am using a similar formula. It works fine without '-'(minus) sign, but when I'm using a minus sign, I am not getting any value.

I used the same formula for Table and it works, but I'm not getting any values for a KPI.