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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue on pie chart background color

hi

Here green--->Allowed

Red---->not allowed

blue--->Hold

orange---->Allowed shortly

i wrote condition like this--->IF(GetCurrentSelections(stage)>0,color(FieldIndex('stage',stage)),color(FieldIndex('stage',stage)))

my issue is  when i am reloading  the application the colors are changing .like this

green--->not allowed

Red---->Allowed

blue--->Hold

orange---->Allowed shortly

Thanks,

siddiq

11 Replies
swuehl
MVP
MVP

Still not sure how your THEN and ELSE branch differ.

If you are using a set identifier like {1} in your expression, you will still see all pie chart segments even when the current selection excludes some values.

In your color expression, you don't cater for possible user selections, so [State] in the aggregation scope might render to NULL for some segments where the user selections should exlcude this value.

Try something like

=if(GetCurrentSelections([State])>0,color(FieldIndex(' State',Only({1}[State]))),color(FieldIndex('State',Only({1}[State]))))

or maybe just

=Color(FieldIndex('State', Only({1} [State]) ))


MarcoWedel