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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to filter records in straight table

Hi

I have a straight table showing 3 dimensions and 10 Expressions..

Now, I'd like to show only records depending on given condition.

In following example, I'd like to show only records where I have "Volumes PY" <> 0 AND "Price gap" <>0

example1.jpg

Do I need to set these conditions in each Expression?

thanks

Andrea

9 Replies
sebastianlettner
Partner - Creator
Partner - Creator

Hi,

you could multiply every Expression with "if("Volumes PY" <> 0 AND "Price gap" <>0, 1, 0)" and use "Supress Zero-Values" at the presentation Tab. Or you create a flag in the data model using "if("Volumes PY" <> 0 AND "Price gap" <>0, 1, 0) as flagShowRecord" and multiply every Expression with the flag.

Regards

Sebastian Lettner

Mark_Little
Luminary
Luminary

Hi,

I would add a flag in your data model.

Something like the below

IF([Volumes PY] <> 0 AND [Price gap] <>0,

          1,

          0

     )                          AS FLAG,


Then in the set analysis on each expression Add {<Flag ={1}>}

i.e.

SUM({<Flag ={1}>}[Net Sales])


Hope this helps

Mark

dmac1971
Creator III
Creator III

Yep Marks solution should work for you.

Not applicable
Author

Hi Mark

thanks for your reply...

I cannot easily (and in a short time...) add a flag to data model and requirement changed to Previous Month instead of Previous Year.. ok that should not be a problem..
directly in the chart

I have to try to solve it directly in the chart.. if possible

I thought there was an option like Filter where [condition satisfied]..

thanks

Not applicable
Author

Hi,

you can put the condition in the dimensions also as,

if("Volumes PY" <> 0 AND "Price gap" <>0, Plant).

sunny_talwar

Are you using Plant as your dimension?

then what aalsaif1‌ suggested should work for you. use this as your dimension

If("Volumes PY" <> 0 and "Price gap" <>0, Plant) and then check 'Suppress When Value Is Null' option

Not applicable
Author

I'm using Plant, Customer and Material as dimensions...

sunny_talwar

It should still work. Just replace Plant with a calculated dimension -> If("Volumes PY" <> 0 and "Price gap" <>0, Plant) and check 'Suppress When Value Is Null' option

Mark_Little
Luminary
Luminary

Hi Andrea,

I think Sunny's approach is probably going to be your best bet if time is a factor.

If it doesn't work as above you could look at adding a calculated dimension for each, Plant, Customer and Material.

Mark