Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

[Question] Using measure to "split" dimensions

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:

SellerMonthSale
Shop AJan5000
Shop BJan1000
Shop CJan500
Shop AFeb3000
Shop BFeb2000
Shop CFeb100

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,

1 Reply
mkelemen
Creator III
Creator III

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