Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

suppress dimensions with zero value

hi all

I would like to suppress dimensions with zero value in a bar chart (too many dimensions).

Dimension: [Inventory Movement Type]

Measure: Sum([Value (Custom)]

I would only like the dimensions where Sum([Value (Custom)] <> 0 to appear.

I have tried with if(Sum([Value (Custom)]) = 0, null(),[Inventory Movement Type]) but it gives me an error - Invalid dimension.

Is there any other way to do it?

Thank you for your help.

Kind regards

Jernej

8 Replies
ali_hijazi
Honored Contributor

Re: suppress dimensions with zero value

put instead that Value (Custom) <> 0 in your set analysis of the expression

sum({< [Value (Custom)]={'*'}-{0}>} ....

simondachstr
Valued Contributor III

Re: suppress dimensions with zero value

ali_hijazi‌ hits is incorrect, as he would like the aggregation of Value (Custom) to exclude zeros, not the dimensional value.

simondachstr
Valued Contributor III

Re: suppress dimensions with zero value

I believe you will need to apply a dimension limitation:

DimLimitation.JPG

Not applicable

Re: suppress dimensions with zero value

thank you for your reply Martin.

This works in general, however, I also have negative values, which get hidden as a result of the limitation.

alextimofeyev
Contributor II

Re: suppress dimensions with zero value

In the Bar Chart properties, unselect Show zero values.

Show zero values.png

simondachstr
Valued Contributor III

Re: suppress dimensions with zero value

Then probably un-selecting "Show zero values" will help.

Another mathematical idea would be to expand the expression so it can be included in the denominator e.g.:

2*Sum([Value (Custom)]/Sum([Value (Custom)]


This way 0s will evaluate to null and hence be suppressed.

Not applicable

Re: suppress dimensions with zero value

thank you Alex. In the end I went with showing only the top 15 absolute values.

Not applicable

Re: suppress dimensions with zero value

thank you Martin. In the end I went with showing only the top 15 absolute values.

Community Browser