Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Lizzie_syn_87
Contributor II
Contributor II

Set Analysis combined with color expression

Hello Qlikers!

I'm having issues with a bar chart that mixes both set analysis, and a color expression.

I've set the set Analysis as follows:

Sum({$<Month=>}[Base_Sales.Amount])

and the color expression as:

if([Base_Sales.Key Figure]='Bud Sales BR',RGB(130,200,220),IF([Base_Sales.Key Figure]='Act Sales AR',rgb(255,180,000),rgb(170,180,000)))

Separated, both the set analysis and the color expression works fine.

If I filter by month the table doesn't change the amounts (as it should), but the colors do change. The values that aren't included in the filter all turn to RGB(170,180,000)

Could anyone help me?

Thanks

 

Labels (2)
1 Solution

Accepted Solutions
treysmithdev
Partner Ambassador
Partner Ambassador

It's a bit hard to tell since I don't know how the selections affect the [Base_Sales.Key Figure] field.

Try this:

if(Only({<Month=>} [Base_Sales.Key Figure])='Bud Sales BR',RGB(130,200,220),IF(Only({<Month=>} [Base_Sales.Key Figure])='Act Sales AR',rgb(255,180,000),rgb(170,180,000)))
Blog: WhereClause   Twitter: @treysmithdev

View solution in original post

1 Reply
treysmithdev
Partner Ambassador
Partner Ambassador

It's a bit hard to tell since I don't know how the selections affect the [Base_Sales.Key Figure] field.

Try this:

if(Only({<Month=>} [Base_Sales.Key Figure])='Bud Sales BR',RGB(130,200,220),IF(Only({<Month=>} [Base_Sales.Key Figure])='Act Sales AR',rgb(255,180,000),rgb(170,180,000)))
Blog: WhereClause   Twitter: @treysmithdev