Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
PhilippeMotillon
Partner - Creator
Partner - Creator

Coloring a pie chart using expression

Hi all ,

I am trying to color a pie chart using the following expression :

=if (aggr(SUM({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"},FileType=>} PHASEDCALLS)-

count({<RecordType={'CALL'},FileType=,CUSTOMER_ID=p({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"}>}CUSTOMER_ID)>} Distinct EVENT_ID),CUSTOMER_ID) = 1,

Yellow(),

if (aggr(SUM({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"},FileType=>} PHASEDCALLS)-

count({<RecordType={'CALL'},FileType=,CUSTOMER_ID=p({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"}>}CUSTOMER_ID)>} Distinct EVENT_ID),CUSTOMER_ID) = 2,

lightblue(),

if (aggr(SUM({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"},FileType=>} PHASEDCALLS)-

count({<RecordType={'CALL'},FileType=,CUSTOMER_ID=p({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"}>}CUSTOMER_ID)>} Distinct EVENT_ID),CUSTOMER_ID) = 3,

lightred(),

if (aggr(SUM({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"},FileType=>} PHASEDCALLS)-

count({<RecordType={'CALL'},FileType=,CUSTOMER_ID=p({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"}>}CUSTOMER_ID)>} Distinct EVENT_ID),CUSTOMER_ID) > 3,

lightred(),

green()))))

It works when the expression = 1 , 2, 3 , but it does not work when the expression is > 3.

Any ideas ?

thanks a lot

Philippe

4 Replies
Anonymous
Not applicable

Hi Philippe,

There is two lightred one for = 3 the other for > 3 try changing the second for an other color

=if (aggr(SUM({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"},FileType=>} PHASEDCALLS)-

count({<RecordType={'CALL'},FileType=,CUSTOMER_ID=p({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"}>}CUSTOMER_ID)>} Distinct EVENT_ID),CUSTOMER_ID) = 1,

Yellow(),

if (aggr(SUM({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"},FileType=>} PHASEDCALLS)-

count({<RecordType={'CALL'},FileType=,CUSTOMER_ID=p({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"}>}CUSTOMER_ID)>} Distinct EVENT_ID),CUSTOMER_ID) = 2,

lightblue(),

if (aggr(SUM({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"},FileType=>} PHASEDCALLS)-

count({<RecordType={'CALL'},FileType=,CUSTOMER_ID=p({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"}>}CUSTOMER_ID)>} Distinct EVENT_ID),CUSTOMER_ID) = 3,

lightred(),

if (aggr(SUM({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"},FileType=>} PHASEDCALLS)-

count({<RecordType={'CALL'},FileType=,CUSTOMER_ID=p({<CUSTOMER_ID={"=sum(PHASEDCALLS) > count(DISTINCT EVENT_ID)"}>}CUSTOMER_ID)>} Distinct EVENT_ID),CUSTOMER_ID) > 3,

lightred(),

green()))))

Regards.

Luc

PhilippeMotillon
Partner - Creator
Partner - Creator
Author

I changed the second lightred to an other color and it does not change anything.

Thanks

Philippe

shraddha_g
Partner - Master III
Partner - Master III

can you share a sample app?

PhilippeMotillon
Partner - Creator
Partner - Creator
Author

Unfortunatly the app is really big (more than 600mb).

I will try to create a small App.

Thanks for your help

Philippe