Forum Discussion

Timuran's avatar
Timuran
Icon for Resolver I rankResolver I
3 years ago
Solved

Need Help - Show correct Percentage in pie chart

Hey,

 

I'm trying to display a pie chart of a measure depending on a category ([Top client All] by 'MARCHE_AGGREGE').

[Top client All] is a measure that calculate [CA client](another measure) with filter depending on others measure.

 

 

[Top client All] = CALCULATE([CA client], INTERSECT(TOPN([NB Top CA],FILTER(DISTINCT(ALLSELECTED(CUBE_VUE_CLIENT[NUMCLI])), NOT ISBLANK([CA client])),[Rang CA],ASC), TOPN([NB Top NB Fac],FILTER(DISTINCT(ALLSELECTED(CUBE_VUE_CLIENT[NUMCLI])), NOT ISBLANK([CA client])),[Rang NB FAC],ASC)))

 

[CA client] = SUMX(CUBE_VUE_FAC_GLO, CALCULATE(SUM(CUBE_VUE_FAC_GLO[CA_LIGNE]), CUBE_VUE_FAC_GLO[NUMCLI]))

 

As you can see on my pie chart, the percentage should be for the MARCHE_AGGREGE -> 'Prive' around 78% ( 95,54k / 122.40k) but shows 63.46 %.

For the value it's correct.

 

It looks like the context disapear when it calculate the percentage.

 

Do you know how to keep the context ?

 

Hope you can help me,

Tim

 

2 Replies