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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
fatihu
Contributor II
Contributor II

Qlik Sense: show dimension only if values are not zero

Hello Community,

 

I have the following situation:

company sales order diff value
companyA 13 11 5 7
companyB 0 0 1 6
companyC 20 4 5 4

 

Now I want to show only the dimensions, where the sales column and the order column are not zero. In this case companyB should not be visible.

 

For example:

sales is sum(X+Y+Z)

order is sum(Z+Y+Y)

dimension is company.name

 

The following doesn't work: 

if(sum(X+Y+Z)<>0 and sum(Z+Y+Y)<>0, company.name)

 

Can anyone help me?

 

Thanks

 

How can I write a script, which filters the dimension?

Labels (4)
1 Reply
rubenmarin

Hi, you can do this based on dimensions or in expressions:

On dimensions, uncheck the option to show null values and use this calculated dimension: Aggr(if(sum(X+Y+Z)<>0 and sum(Z+Y+Y)<>0, company.name), company.name)

On expressions, on add-ons uncheck the option to show zero values and add the check in each of the other expressions (diff and value in the sample): if(sum(X+Y+Z)<>0 and sum(Z+Y+Y)<>0, [ColumnExpression])