I want to get the cumulative value of my measure called "Pres_Ecart CA vs Obj" based on the order of another measure called "Var. CA Obj en %".
What I have in my canvas is a matrix where I visualize 3 columns as a hierarchy "A" that contains multiple values of "B", and for each B, I have a value of C .
Please note that I use SAAS live connection with Power so I can't create physical tables.
I tried so many methods like max
, sumx
. Please note that I only want the sum of the positive values and what I want to do next is to stop the cumulative values at the top 80 % of my measure for each "A".
I tried to explain using Excel to facilitate things
Cumulativ values of Pres_Ecart CA vs Obj less than 80 % =
VAR CurrentSite = SELECTEDVALUE('Axe_SIteInfo'[B])
VAR CurrentCluster = SELECTEDVALUE('Axe_SIteInfo'[A])
VAR AllSites =
FILTER(
ALLSELECTED('Axe_SIteInfo'),
'Axe_SIteInfo'[A] = CurrentCluster
&& NOT(ISBLANK([Pres_Ecart CA vs Obj]))
&& [Var. CA Obj en %] <= MAXX(ALLSELECTED('Axe_SIteInfo'), [Var. CA Obj en %])
)
VAR CumulativeValue =
SUMX(
FILTER(
AllSites,
'Axe_SIteInfo'[B] <= CurrentSite
),
[Pres_Ecart CA vs Obj]
)
RETURN