Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Partner - Master II
Partner - Master II

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

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

I can walk on water when it freezes
simondachstr
Luminary Alumni
Luminary Alumni

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

simondachstr
Luminary Alumni
Luminary Alumni

I believe you will need to apply a dimension limitation:

DimLimitation.JPG

Not applicable
Author

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
Partner - Creator II
Partner - Creator II

In the Bar Chart properties, unselect Show zero values.

Show zero values.png

simondachstr
Luminary Alumni
Luminary Alumni

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
Author

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

Not applicable
Author

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