Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
Showing results for 
Search instead for 
Did you mean: 
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
Creator III
Creator III

Try something like,

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

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

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

Contributor III
Contributor III

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

Creator III
Creator III

Well - You need to tweak little bit

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


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