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: 
Not applicable

Expression does not need to show results when equal to zero

I have a question about calculating in a dimension, I am using an excel spreadsheet as the data source and I want to count the number of 'Cont. Labor Cross Charge-In' and 'Cont. Labor Cross Charge-out', one is a positive number and the other a negative number, if adding both together balances out I do not want to display results in the chart. So far I can see a 1 in my chart when the numbers balance out to zero, so I think I need to add something to the end to say if equal or zero do not show me, only show when the numbers do not match.



Here is the expression:

count(if(

[DESCRIPTION] <> ''

and [DESCRIPTION] <> null()

and (

[DESCRIPTION] = 'Cont. Labor Cross Charge-In'

or [DESCRIPTION] = 'Cont. Labor Cross Charge-Out'

) // end and

,[ID]

) // end if

) // end end count

/ count(distinct if(

[DESCRIPTION] = 'Cont. Labor Cross Charge-In'

or [DESCRIPTION] = 'Cont. Labor Cross Charge-Out'

,[ID]

) // end if

) // end count

2 Replies
Not applicable
Author

I didn't re-type your expression but if you substitute exp_1 & exp_2 with your expressions you can use something like whats below

if(exp_1 - exp_2 <> 0, hours_diff)

Not applicable
Author

If you are using a chart just select "Surpress values when null"