Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

dmg17188
New Contributor II

Help filtering an expression

I'm trying to build a bar chart where I have car_model as the dimension and sum of sales by month as the measure.  I only want the chart to show the sum of sales where car_color = "Black"

For the car_model expression, my attempt at filtering to have only black cars included is below.  The syntax appears to be correct, but Qlik says it's an "Invalid Dimension". 

=count({$<[car_color]="Black">} Distinct car_model)

I understand that dimensions shouldn't have aggregate functions, so I tried taking out "count" and it still doesn't work.  I also tried taking out distinct, but that didn't make a difference either.

Thank you for the help!

Tags (1)
1 Solution

Accepted Solutions

Re: Help filtering an expression

Try this

Dimension

Car_model

Expression

Sum({<[car_color] = {'Black'}>}Sales)

2 Replies

Re: Help filtering an expression

Try this

Dimension

Car_model

Expression

Sum({<[car_color] = {'Black'}>}Sales)

dmg17188
New Contributor II

Re: Help filtering an expression

Sunny,

That did it!  Thank you so much!!

Community Browser