Forum Discussion
Cumulative items
- 6 years ago
Hi mgastalho ,
Based on your sample data, we can create two measures to meet your requirement.
Cumulative = CALCULATE(SUM('Table'[Items]),FILTER(ALLSELECTED('Table'),'Table'[Days]<=MAX('Table'[Days])))% = var _cum = CALCULATE(SUM('Table'[Items]),FILTER(ALLSELECTED('Table'),'Table'[Days]<=MAX('Table'[Days]))) var _Total = CALCULATE(SUM('Table'[Items]),ALLSELECTED('Table')) return DIVIDE(_cum,_Total)If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi mgastalho ,
Based on your sample data, we can create two measures to meet your requirement.
Cumulative =
CALCULATE(SUM('Table'[Items]),FILTER(ALLSELECTED('Table'),'Table'[Days]<=MAX('Table'[Days])))
% =
var _cum = CALCULATE(SUM('Table'[Items]),FILTER(ALLSELECTED('Table'),'Table'[Days]<=MAX('Table'[Days])))
var _Total = CALCULATE(SUM('Table'[Items]),ALLSELECTED('Table'))
return
DIVIDE(_cum,_Total)
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.