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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Try using only() around Lineflag:

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

View solution in original post

2 Replies
swuehl
Champion III
Champion III

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