8 Replies Latest reply: Mar 16, 2016 10:22 AM by Jernej Istenic

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?

Kind regards

Jernej

• Re: suppress dimensions with zero value

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

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

• 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.

• Re: suppress dimensions with zero value

I believe you will need to apply a dimension limitation:

• Re: suppress dimensions with zero value

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

• 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.

• Re: suppress dimensions with zero value

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

• Re: suppress dimensions with zero value

In the Bar Chart properties, unselect Show zero values.

• Re: suppress dimensions with zero value

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