Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This is probably really easy but I cannot find the function for it. Basically I want to take the minum of all values in my dimension which is not zero.
i.e for the following dataset:
id, value, ....
1, 4800,
2, 3300,
3, 2900,
4, 3000,
5, 0,
6, 4100,
7, 2400
8, 0
9, 2800
I want the expresion to return 2400. This is only for one visualization so I don't want to remove the 0 values in the data load script. I was looking for a "filter" function to filter out all 0 values in the array before applying the Min aggregation but it doesn't seem to exist.
min({<value={">0"}>}value) should work
Hi Viktor,
You can use Calculated Dimension like
Aggr(If(Sum(Value) > 0,ID),ID)
Regards,
Antonio
min({<value={">0"}>}value) should work
I hadn't come across the set concept yet. This is what I was looking for, thanks.
Thanks for the answer! It takes a little bit getting used to the Qlik script syntax and function names. I'm a bit confused about Aggr. I'm used to thinking functional and was looking for "filter" or "map" functionality. I first thought Aggr is map but looking at the examples is more like SQL group by?
Yes Viktor,
Aggr() is Group By.
Aggr(If)) is Group By + where
Regards,
Antonio