Qlik Community

Qlik Sense App Development

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

gameoverzx
New Contributor III

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

Re: Get Dimension with Highest Value

May be this

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


Capture.PNG

4 Replies
ogautier62
Valued Contributor II

Re: Get Dimension with Highest Value

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

Re: Get Dimension with Highest Value

May be this

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


Capture.PNG

gameoverzx
New Contributor III

Re: Get Dimension with Highest Value

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
Valued Contributor II

Re: Get Dimension with Highest Value

Yes!!!!

I made a copy paste of your text

Replace And with, (comma)

And Maxstring in place of max for a string

Community Browser