Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
vijetas42
Specialist
Specialist

Expression

Hi all,

I need your help my scenario is,

I have straight table in which i have data like,

Product Sales

P1          0

P2          20

P3           0

P4           0

Now,my requirement is my product P1 and P2 will always get displayed even though their sales is =0 and P3 and P4 product should only get displayed if their sales >0

please let me know how to write expression for it.

Thanks

6 Replies
swuehl
MVP
MVP

Enable 'suppress zero values' on presentation tab.

Create a second expression

=if( match(Product,'P1','P2'),1,0)

and hide this expression column on presentation tab.

vijetas42
Specialist
Specialist
Author

It doesn't work for me. I tried your expression but it showing P3 and P4 though their values are 0 my requirement is show P3 and P4 only their sales >0

swuehl
MVP
MVP

Could you upload a small sample QVW?

vijetas42
Specialist
Specialist
Author

Sorry,but i cant upload QVW file

swuehl
MVP
MVP

Not even a sample?

The approach described above works at my side, given your sample data and applying my settings to the straight  table chart (including 'suppress zero values').

Without using my second expression, how many products do you see in your chart?

vijetas42
Specialist
Specialist
Author

Hey, It worked but ,only i have checked option suppress zero values option from presentation tab