Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Query with set analysis expression

Hi all,

I am trying to get some sety analysis to work but struggling..

I want to set some slice colours in a pie chart.

Currently i have the following in the background colour of the expression

=if(LineFlag = 'R',rgb(255,0,0),

if(LineFlag = 'G', rgb(0,255,0),

if(LineFlag = 'A', rgb(255,153,18), rgb(255,0,0))))

But i want to set each pie chart to a specific week.

The expression i am using is

=COUNT({$<WeekDesc = {'6'}>} PordDetail)

How c=would i include the set analysis in this expression into the background colour expression.?

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try using only() around Lineflag:

=if( only({$<WeekDesc = {6}>}LineFlag) = 'R',rgb(255,0,0),...

View solution in original post

2 Replies
swuehl
MVP
MVP

Try using only() around Lineflag:

=if( only({$<WeekDesc = {6}>}LineFlag) = 'R',rgb(255,0,0),...

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Thanks Stefan