Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am new to Qlik Sense
I have this data set. They want me to display minimum difference of dates by Case Number in a KPI box.
When we choose the case number in a filter then KPI should show the minimum difference. In this case - 14.
How can I achieve this in Expressions?
@PrashantRupani try below
=FirstSortedValue(Date1-Date2, aggr(Date1-Date2,CaseNumber))
It returned - when I create the expression. I ensured I choose the case number in the filter. But it returns -
@PrashantRupani did you try Min(Date1-Date2)
I tried this expression : =AGGR(MIN(Date1-Date2),Case Number)
It returns 14 when I choose only one Case Number in the filter but when I try choosing multiple case numbers in the filter, it returns nothing. It shows '-' . I
Say if there was another case number 101 where the minimum difference is 10
My requirement is to show (14+10)/2 which is 12 ( 2 case number hence divide by 2). I need to return 12 in the KPI Object.
@PrashantRupani try this
Avg(Aggr(Min(Date1 - Date2), [Case Number]))
That worked. Thanks Sunny