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

1 Solution

Accepted Solutions
sunny_talwar

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

You can use an if statement

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

sunny_talwar

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

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

Anil_Babu_Samineni

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.