Forum Discussion
Arranafc19
7 years agoHelper IV
Creating a Cumulative Line Chart
I am working on a report which calculates the percetage of cars sold per month , with the null value being the ones not sold. I have managed to create the below dataset and calculated the percetages ...
Arranafc19
7 years agoHelper IV
MFelix
7 years agoSuper User
Hi Arranafc19 ,
Try the following measure:
Cumulative % =
CALCULATE (
CALCULATE (
COUNTROWS ( DealerData );
FILTER (
ALL ( DealerData[MonthOfSale]; DealerData[Dealer] );
DealerData[MonthOfSale] <= MAX ( DealerData[MonthOfSale] )
);
DealerData[MonthOfSale] <> BLANK ()
)
)
/ CALCULATE ( COUNTROWS ( DealerData ); ALLSELECTED ( DealerData ) )
Based on the context of your table I had to redo the calculation in the cumulative.
Be aware that if you add another field for context like the dealer the formula will give repeated values for each of the months
Check result in PBIX file attach.
Regards,
MFelix