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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
raZor
Contributor III
Contributor III

Colors in pie chart

I have this expression in a table where I am showing percentage of this expression

sum({<Flag = {"allocation"},Resource =- {"NA"},Profile -= {"NA"}>}(Value))
/
sum({<Flag = {"capacity"}>}(Value))

 

I want to show pie chart as red,green,blue if the result

Dimension-

if above expression's result is  more than 111% then red

if above expression is less than or equal to 90% then yellow

if above expression's value is between 91-110% then green

 

Measure-

Count (profile)

Labels (1)
2 Replies
Claudiu_Anghelescu
Specialist
Specialist

if(sum({<Flag = {"allocation"},Resource =- {"NA"},Profile -= {"NA"}>}(Value))
/
sum({<Flag = {"capacity"}>}(Value)) > 1.11 , red(),

if(sum({<Flag = {"allocation"},Resource =- {"NA"},Profile -= {"NA"}>}(Value))
/
sum({<Flag = {"capacity"}>}(Value)) >= 0.9 , yellow(),

if(sum({<Flag = {"allocation"},Resource =- {"NA"},Profile -= {"NA"}>}(Value))
/
sum({<Flag = {"capacity"}>}(Value)) > 0.91 and sum({<Flag = {"allocation"},Resource =- {"NA"},Profile -= {"NA"}>}(Value))
/
sum({<Flag = {"capacity"}>}(Value)) > 1.11 , green()

)))

To help community find solutions, please don't forget to mark as correct.
Claudiu_Anghelescu
Specialist
Specialist

This solution helped you? 

To help community find solutions, please don't forget to mark as correct.