Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional data on a straight table?

I have a straight table created as follows:

Customer NameInvoiceDiscountDiscount %
Customer A10055
Customer B20063
Customer C10077
Customer D10077
Customer D200105
Customer B10033

My actual straight table has additional dimensions and expressions, but for simplicity's sake, assume the above. I want my table to always exclude rows for certain customer names irregardless of other selections made, let's say Customer B and Customer C. So what I want to see (at least before other selections are made) is:

Customer NameInvoiceDiscountDiscount %
Customer A10055
Customer D10077
Customer D200105

Should I be trying to use a calculated dimension here? Something like:

=if([Customer Name]='Customer B' or 'Customer C',' ',[Customer Name])

And then use some kind of 'Suppress When Value is Null'?

Or should I rather be trying to use 'Enable Conditional' on every single Dimension and 'Conditional' on every expression Expression? Something like:

[Customer Name]<>'Customer B' and [Customer Name]<>'Customer C'

I tried the latter approach and Customer B and C still show up in the table when no selections are made; when I actually pick one of them, the table disappears, but they are still in the table to start with.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thanks all-

I ended up figuring this out myself late last night Here's what worked:

=if([Customer Name]='Customer B', Null(),
if([Customer Name]='Customer C, Null(),
[Customer Name]))

And the suppressing null values. Perhaps not the most elegant solution but it works!

View solution in original post

3 Replies
tamilarasu
Champion
Champion

Hi,

There are two methods.

1. You can hide the specific customer names by adding calculated dimension expression as

=If(Not Match([Customer Name],'Customer B','Customer C'),[Customer Name])

and by enabling the Suppress when Value Is Null option.


2. You can use expression as


=If(Not Match([Customer Name],'Customer B','Customer C'), Your Expression)    //Expression can be Sum(Sales) or something


You have to write the same for all your expressions.

I have attached sample for your reference.

Not applicable
Author

Use add calculated dimension and write :

=if([Customer Name]<>'Customer B' and [Customer Name]<>'Customer C',[Customer Name])

Anonymous
Not applicable
Author

Thanks all-

I ended up figuring this out myself late last night Here's what worked:

=if([Customer Name]='Customer B', Null(),
if([Customer Name]='Customer C, Null(),
[Customer Name]))

And the suppressing null values. Perhaps not the most elegant solution but it works!