Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
claudialet
Contributor III
Contributor III

Can if match () be used in a conditional show/hide expression ?

Here is an expression for a column in a pivot table. It is a dimension not a measure

if (match (Retailer,  'Verizon', ' Apple') , Retailer )

So it shows  columns for Verizon  and Apple. Then there is another dimension collapse underneath +  Online Sales

  Verizon                  Apple

+  online sales          + online sales

How do I make Verizon and Apple show only  if there is value in Online Sales and hide if there is no value in Online Sales?

  Or how about show / hide made on latest updates in Online Sales ?

4 Replies
Anonymous
Not applicable

Try something like,

IF(Online sales > 0,IF(Match(Retailer,'Verizon','Apple'),Retailer),""))

Then just select the suppress if null selection on the dimension.

amit_gupta
Contributor III
Contributor III

By Using same Expression Which you have written

if (match (Retailer, 'Verizon','Apple'), Retailer)


You Just need to "Suppress When the Null" for Parent Dimension. 

I hope, It will work for you

claudialet
Contributor III
Contributor III
Author

This solution hides all columns with zero values.

Unfortunately  my issue is I only need to hide 2 columns.

  Let's say I have more 'Retailer' values

  Apple           Verizon         Sprint          Best Buy         T-mobile

  How do I hide only  Sprint and T-mobile  based on zero values in  'Online Sales' but others can show even if they have zeros

jayanttibhe
Creator III
Creator III

Well - You need to tweak little bit

Assuming you  DONT want to See the 'Verizon','Apple'  For Zero values.

Dimension:

Pick (match (Retailer, 'Verizon','Apple'), Retailer,Retailer)

Expression :

Pick (match (Retailer, 'Verizon','Apple',Retailer), OnlineSales,OnlineSales,Rangesum(OnlineSales,0.00001))

in setting 'SuppressZero" for the expression and Number Format make it ronding as appropriate