Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Apologies in advance if this is a basic question - but I want to create a KPI on my dashboard to count if products are <, = or > a certain age. The age is setup in my dataset as a calculated field (Date Authorised - Date Logged)
I have filters on the top of the dashboard, so not sure if I can use set analysis? My formula for the KPI is
count(distinct(Age<10))
But the number returned does not correspond with the data in a straight table. Any help/ info on where I'm going wrong much appreciated
Hi
you can do
sum(aggr(if(Age<10,1,0),product))
@lironbaram thank you 🙂 I never knew you had to aggregate and then sum to countif in Qlik. Much appreciated !
Hey @lironbaram
Apologies for this - looks like the formula is working but not counting all of the values that is corresponding in the straight table.
KPI is reading 3, but there are 14 samples in the straight table below.
'Age' is a calculated field and I am using =floor(Age) in the straight table as age is timestamped.
Hi
try this :
sum(aggr(if(floor(max(Age))<10,1,0),product))
Many many thanks @lironbaram , would not have gotten that on my own!