# Qlik Sense App Development

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

 1 13-06-18 2 13-06-18 177 13-06-18 78 13-06-18 2 13-06-18 22 13-06-18 184 13-06-18 4795 13-06-18 9 13-06-18 12754 13-06-18 9 13-06-18 261890 13-06-18 232 13-06-18 109 13-06-18 337 13-06-18 124 13-06-18 1 12-06-18 2 12-06-18 177 12-06-18 78 12-06-18 2 12-06-18 22 12-06-18 184 12-06-18 4763 12-06-18 9 12-06-18 12752 12-06-18 9 12-06-18 261136 12-06-18 232 12-06-18 109 12-06-18 337 12-06-18 114 12-06-18 1 06-06-18 2 06-06-18 176 06-06-18 78 06-06-18 2 06-06-18 21 06-06-18 181 06-06-18 4623 06-06-18 8 06-06-18 12725 06-06-18 9 06-06-18 240794 06-06-18 229 06-06-18 107 06-06-18 336 06-06-18 113 06-06-18 1 08-06-18 2 08-06-18 176 08-06-18

Thanks

1 Solution

Accepted Solutions
MVP

## Re: Get Dimension with Highest Value

May be this

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

5 Replies
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

MVP

## Re: Get Dimension with Highest Value

May be this

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

Partner

## Re: Get Dimension with Highest Value

Realized that my output was not in date format.

Total carelessness on my side.

Valued Contributor II

## Re: Get Dimension with Highest Value

Yes!!!!

Replace And with, (comma)

And Maxstring in place of max for a string

New Contributor III

## Re: Get Dimension with Highest Value

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.