Forum Discussion
Cumulative Sales Calculation
- Anonymous7 years ago
PS. I have already sum'd sales and complaints using a seperate Measure.
- 7 years ago
Hi Anonymous
By my test, you didn’t calculate the cumulative sales and complaints. You still need other formulas. The following are the formulas you can have a try.
1.Cumulative Complaints =
CALCULATE (
SUM ( Table1[Complaints] ),
FILTER (
ALL ( Table1[Month Start] ),
Table1[Month Start] <= MAX ( Table1[Month Start])
)
)
2.Cumulative sales =
CALCULATE (
SUM ( Table1[Sales] ),
FILTER (
ALL ( Table1[Month Start] ),
Table1[Month Start] <= MAX ( Table1[Month Start])
)
)
3.Cumulative Complaint Rate =
IF (
DIVIDE ( [Cumulative Complaints], [Cumulative sales], 0 ) <> 0,
DIVIDE ( [Cumulative Complaints], [Cumulative sales], 0 )
)
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
By my test, you didn’t calculate the cumulative sales and complaints. You still need other formulas. The following are the formulas you can have a try.
1.Cumulative Complaints =
CALCULATE (
SUM ( Table1[Complaints] ),
FILTER (
ALL ( Table1[Month Start] ),
Table1[Month Start] <= MAX ( Table1[Month Start])
)
)
2.Cumulative sales =
CALCULATE (
SUM ( Table1[Sales] ),
FILTER (
ALL ( Table1[Month Start] ),
Table1[Month Start] <= MAX ( Table1[Month Start])
)
)
3.Cumulative Complaint Rate =
IF (
DIVIDE ( [Cumulative Complaints], [Cumulative sales], 0 ) <> 0,
DIVIDE ( [Cumulative Complaints], [Cumulative sales], 0 )
)
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous7 years agoNot applicable
Xue.. many thanks for the feedback. that works just fine.