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: 
Anonymous
Not applicable

Pick only certain Category Values in a variable.

Hi anyone,

I am looking for help on how to get the dimension only for certain categorical values while writing expression.

I have 3 columns Website, StockIndicator and Products.

Problem statement:

Under each Website i have to count how many Products are available under StockIndicator Yes, No where in StockIndicator i have 4 different categorical values

Yes, No, Not Available and Null


example to achieve results

Website          StockIndicator           Products

ABC                    Yes                         100

A2Z                     Yes                          50

A2Z                      No                           50

I should eliminate Other Categories in StockIndicator which i should do it in Expression not in Load.

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Like this :


=sum( {<StockIndicator={'Yes','No'}>} Products)

View solution in original post

5 Replies
YoussefBelloum
Champion
Champion

Hi,

on a simple table chart, put Website and StockIndicator as a dimensions, and use this as an expression:

=sum( {<StockIndicator={'Yes'}>} Products)


It will count how many products you have on every website only for StockIndicator 'Yes'

Anonymous
Not applicable
Author

Thank you Youssef. But this is giving me result only for Yes. I also need No . How to add or condition!

YoussefBelloum
Champion
Champion

Like this :


=sum( {<StockIndicator={'Yes','No'}>} Products)

Anonymous
Not applicable
Author

It Worked. Thank you very much for educating me.

YoussefBelloum
Champion
Champion

you're welcome.

it is called SET ANALYSIS, make some research on it, you will have to use it, and it can be much more complicated than the one I gave you.

Good luck