Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm a new user using QlikSense.
I'm trying to filter a dimension by a measure, but unsure how. Data looks similar to this:
Seller | Month | Sale |
---|---|---|
Shop A | Jan | 5000 |
Shop B | Jan | 1000 |
Shop C | Jan | 500 |
Shop A | Feb | 3000 |
Shop B | Feb | 2000 |
Shop C | Feb | 100 |
I want to create a stacked bar chart, showing Sale by month, split between Big Seller (Sale >=1000 for that month) and Small Seller (Sale < 1000 for that month).
I'm using QlikSense Cloud, and my organization has locked the option to create new dimension, so I tried to use Month & Seller as Dimensions (in that order), Sale as measure. On Seller Dimension, inputting syntax:
if(Sale >= 1000 ,'Big Seller','Others')
Obviously the result didn't come out as wished
Would love to get some advice.
Thank you,
Hi,
you need to create two expressions
Big sellers:
Sum({<Seller = p({<Sale = {">=1000"}>} Seller)>} Sale)
Others:
Sum({<Seller = p({<Sale = {"<1000"}>} Seller)>} Sale)
This works if there is only one value per Seller per Month.
P() function returns Seller values with the given set modifier.
BR,
Matus