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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Fareeha123
Contributor III
Contributor III

Hide/Exclude 0 from Total

Hi

I am creating a table in pixel perfect. The measure column is showing Dual(sum and Count). Pixel perfect was not supporting dual function so i added sum formula field from Qlik and created count as formula in pixel perfect and inserted cell to show the count formula. When sum =0 it is not showing in total. when total count = 0 it is showing on Total group header, and we want to hide/exclude 0. 

I tried formatting rule but it is giving error because my expression has set analysis

count({<OD_ReporingMonthEnd={'$(=$(vEndDate))'}>}OD_USD_Equivalent)

 

1. Can you please guide how to hide/exclude 0 from total?

attaching screenshot as example from the output. 

2. when there is all is zero or null for a selection, how to show 'No Data' message instead of table ?

 

 

Labels (2)
1 Solution

Accepted Solutions
Fareeha123
Contributor III
Contributor III
Author

I wanted to hide the header when Sum and count in total is zero. I was able to achieve that by formatting rule. I created the rule using sum field. Sum(Field)<0 then visibility 'No' applied that rule to group header band. This way i was able to hide the headers when total was zero.

View solution in original post

5 Replies
robert_mika

Create a new field in your Qlik data model:

 

If(OD_USD_Equivalent > 0 and OD_ReporingMonthEnd = $(vEndDate), 1, 0) as ValidCountFlag


Then in PixelPerfect:

 


Sum(ValidCountFlag)

 

 

Fareeha123
Contributor III
Contributor III
Author

I tried that it is still showing 0 in the total line

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Fareeha123 

it is not clear exactly what you need. When it is 0 do you:

  • want to show total line but have nothing in it?
  • want to hide whole total line all together?

i am not understanding whether we need to focus on number formats which can have dedicated symbol for when it is 0 or if we need to make whole template dynamic (hide/show header) based on one value from total line?

Cheers

cheers Lech, 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 to the problem.
Fareeha123
Contributor III
Contributor III
Author

I wanted to hide the header when Sum and count in total is zero. I was able to achieve that by formatting rule. I created the rule using sum field. Sum(Field)<0 then visibility 'No' applied that rule to group header band. This way i was able to hide the headers when total was zero.

Ruggero_Piccoli
Support
Support

Hi,

Using formatting rules is the correct way to proceed in similar cases.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.