Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Prabhu
Creator
Creator

Color expression for multiple colors is not working in Word cloud extension.

Hi All,

I am using the  below expression in Word cloud extension. It is picking only the first color. It is not working for remaining two colors.

=if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') <'70%', RGB(232,9,9),


if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') >='70%' and


num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') <='89%', RGB(250,166,53),


if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') >='90%', RGB(84,130,53))))

Please help me.

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be try this?

=if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') <0.7,RGB(232,9,9),
if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') >=0.7 and
num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') <=0.89,RGB(250,166,53),
if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') >=0.9,RGB
(84,130,53))))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

10 Replies
Anil_Babu_Samineni

May be try this?

=if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') <0.7,RGB(232,9,9),
if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') >=0.7 and
num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') <=0.89,RGB(250,166,53),
if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00%') >=0.9,RGB
(84,130,53))))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
pradosh_thakur
Master II
Master II

May be this

if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00') <0.7,RGB(232,9,9),


if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00') >= 0.7and


num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00') <=0.89,RGB(250,166,53),


if(num(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT),'##.00') >= 0.90,RGB(84,130,53))))

Learning never stops.
Prabhu
Creator
Creator
Author

Hi Ravi,

I have tried this. But, no luck.

Prabhu
Creator
Creator
Author

Hi Pradosh,

I have tried this. But, still not working.

Anil_Babu_Samineni

Could be wrong with your expression. And expression should match with the condition

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Prabhu
Creator
Creator
Author

The same expression is working for other charts. I am using QV 12. Word cloud extension  supports QV 11 only?

Anil_Babu_Samineni

Can you share sample to test?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
johnca
Specialist
Specialist

Another possibility...remove the number formatting entirely and just use the values:


=if(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT) <0.7,RGB(232,9,9),
if(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT) >=0.7 and
sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT) <=0.89,RGB(250,166,53),
if(sum(LA_DQM_QC_DETAIL_FACT.QC_COUNT)/sum(total LA_DQM_QC_DETAIL_FACT.QC_COUNT) >=0.9,RGB(84,130,53))))

Prabhu
Creator
Creator
Author

Thanks, it is working. Only problem is it is hiding some components with bigger size. If we adjust the size then no problem.