Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

How to remove values from an aggregation?

I have a bar chart with a dimension specified by an expression like:

     class(aggr(FirstSortedValue(value, -time), category), 100)

If the result of the FirstSortedValue expression is 0, I would like to not show those data points in my chart. Is that possible?

1 Solution

Accepted Solutions
Highlighted

Re: How to remove values from an aggregation?

May be this

Class(Aggr(If(FirstSortedValue(value, -time) <> 0, FirstSortedValue(value, -time)), category), 100)

4 Replies
kellymcgrady
Contributor

Re: How to remove values from an aggregation?

If that is the only value then you have the option of not showing nulls. It's in the measure itself as an option.

Not applicable

Re: How to remove values from an aggregation?

My values are explicitly 0, not null. I also want to only exclude the entire category if the LATEST value is 0, even if there were previous non-0 values. For example:

value   time    category

0          11:00  c

10        10:00  c

20        11:00  b

0          10:00  b

I want to include b (20,11:00, b) in my chart because the latest value is 20, but I do not want to include c because the latest value is 0 (0,11:00, c).

Highlighted

Re: How to remove values from an aggregation?

May be this

Class(Aggr(If(FirstSortedValue(value, -time) <> 0, FirstSortedValue(value, -time)), category), 100)

Not applicable

Re: How to remove values from an aggregation?

That helps, thanks!

Community Browser