Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Kailash_Shaw
Contributor II
Contributor II

Include/Exclude Zero Values Dynamically

Hey!

I need a help to Include/Exclude Zero Values Dynamically. Probably based on Button/Variable Input selections.

I have this Pivot where 'Canutility' - 'DD' has 0 for both the measures. I can add/remove that row if 'Include Zero Values' button is checked/unchecked.

Can we achieve this with button on the front end? Clicking that button will include/exclude zero values.

Please suggest.

Kailash_Shaw_0-1661246610595.png

 

Kailash_Shaw_1-1661246634306.png

 

Labels (1)
8 Replies
Or
MVP
MVP

I am not familiar with a way to do this directly, but you could consider a show/hide container containing two copies of the same object, one with zero values included and one without, and toggle them based on a button or whatever other condition. This does require you maintain two objects, though...

Kailash_Shaw
Contributor II
Contributor II
Author

Thanks @Or, I will try that if app size permits.

Or
MVP
MVP

The impact an extra object has on app size is negligible, so that shouldn't be a problem. It's mostly the issue of maintaining two objects and potentially the issue of using a container and master items (which makes it harder for users to edit the object after duplicating, if that's a consideration).

Kailash_Shaw
Contributor II
Contributor II
Author

Oh ok, got it, thank you!

MayilVahanan

Hi 

Try like attachment. 

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Kailash_Shaw
Contributor II
Contributor II
Author

Thanks @MayilVahanan 
One query, how to make it work if I have multiple dimensions into table?
I am pasting your dimension expression here for quick reference.

=Aggr(If(vHideZeroValue = 1, if(Sum(UnitPrice)+Sum(UnitSales)>0, Product), Product),Product)

MayilVahanan

Hi

Try like below, 

Hope it helps

=Aggr(If(vHideZeroValue = 1, if(Sum(UnitPrice)+Sum(UnitSales)>0, Product), Product),Product, Customer)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Kailash_Shaw
Contributor II
Contributor II
Author

Thanks experts!

I have found another workaround that suited me better in this app.

I have unchecked the Include Zero Values in add on properties and added additional field to hide/unhide zero values with variable input. Here are the screenshots for reference.

Kailash_Shaw_0-1661761851329.pngKailash_Shaw_1-1661761888719.png