Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
danimarc12
Partner - Creator
Partner - Creator

FirstSortedValue KPI

Hi everyone!

I want to display a single KPI with a Count() function.

I have this chart

Cattura.PNG

with this dimension

Cattura1.PNG

and this measure

Cattura2.PNG.

I want to display a single KPI which count(distinct numpratica) of a single value (idstep=80) of the dimension in the chart.

How can I write this expression?

Thanks to all!

4 Replies
brunobertels
Master
Master

hi 

Try this 

count(distinct {<idstep={'80'}> numpratica})

danimarc12
Partner - Creator
Partner - Creator
Author

Hi, it doesn't work because I must to keep only the last value, not all the values with idstep=80

brunobertels
Master
Master

hi 

try then 

aggr(firsortedvalue(  {<idstep={'80'}> NomeStep,- UltimaModifica), numpratica)

danimarc12
Partner - Creator
Partner - Creator
Author

Ok, I see the name of the field idstep=80

Cattura.PNG

But I want to count it, I shoul see in this KPI the number 17

Cattura1.PNG