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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Replace Zeros with Empty Values

I have an expression and sometime the output value is "0". I want to replace it with ""

expression - sum( {$<Type={AAA}>} Hours )

Thanks

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

You can use an if statement

If(Sum({<Type = {AAA}>} Hours) > 0, Sum({<Type = {AAA}>} Hours))

View solution in original post

7 Replies
sunny_talwar
MVP
MVP

You can use an if statement

If(Sum({<Type = {AAA}>} Hours) > 0, Sum({<Type = {AAA}>} Hours))

sunny_talwar
MVP
MVP

or you can do something like this:

Sum({<Type = {AAA}>} Hours) * (Avg({<Type = {AAA}>} Hours)/Avg({<Type = {AAA}>} Hours))

sushil353
Master II
Master II

Hi,

You can also try option to suppress 0 values from expression. setting>presentation>suppress zero value option checked in..

other wise sunny answer should work.

anuradhaa
Partner - Creator II
Partner - Creator II
Author

I have three columns in my pivot table, when i use this some records were exclude even the >0 values in another coulm.

so If(Sum({<Type = {AAA}>} Hours) > 0, Sum({<Type = {AAA}>} Hours),'')

Solve the issue

sunny_talwar
MVP
MVP

Your three columns are three expressions or are you just using a pivoted dimension with just 1 expression?

Anil_Babu_Samineni
MVP
MVP

Check from Presentation Tab

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
anuradhaa
Partner - Creator II
Partner - Creator II
Author

Yes, You are correct. In one column i'm getting sums of other two columns and that is the column that i have question.

sum(hours) - [col 1]  - [col 2].

So my solution also wrong even though it display the raw the values are incorrect. Then i have replace coulm names in the expression with whole expression, then issue resolved.

Thanks Sunny.