Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
joshabbott
Creator III
Creator III

Waterfall Chart - Show bar even if 0 value

I am working on a waterfall chart, and one issue I've come upon is 0 values.  I don't want the bar to be supressed if the value is 0, instead, I want it to show 0 and to show a line where the value would be (small bar).  I found a way to do this by using an if statement in set analysis, so it would be something like:

if(complex set analysis = 0, .1, complex set analysis)  - Since I'm displaying only whole numbers, this shows me a small bar and a value of 0.

Right now, I am trying to make the application more effecient and the if statement is a high cost function that I would like to take out if possible.  I'm assuming with the if statement, my complex set analysis is having to run twice in most instances.  Does anyone have a suggestion for a way to make this more effecient?  Thank you!

1 Solution

Accepted Solutions
Not applicable

Hi again, please find attach a waterfall example using a different approach. The main point out of this is using the column value calculated in an invisible column and then use the if statement on the amount and not in the actual expression.

Hope this helps

Regards

View solution in original post

4 Replies
Not applicable

Hi, I think you can use a rangemax function or rangemin depending on your particular case, like this:

rangemax(complex set analysis, .1)

Regards

joshabbott
Creator III
Creator III
Author

This may be the way I can go, unfortunately, on a bar by bar basis, the number could be positive or negative.

Not applicable

Hi again, please find attach a waterfall example using a different approach. The main point out of this is using the column value calculated in an invisible column and then use the if statement on the amount and not in the actual expression.

Hope this helps

Regards

joshabbott
Creator III
Creator III
Author

That is genius, thank you so much.  That works perfect for what I'm trying to do.  Thanks!