Fixing errors with your totals efficiently - cumulative patterns

After doing the course ’ Fixing errors with your totals efficiently’ from the ’ Mastering DAX Calculations’ course, I am trying to apply this pattern for my churn % overtime. However, when i try to do it with cumulative measures I can’t get it to work: the context of the cumulative patterns within the virtual table is not working, so either the cumulatives are only showing values for a specific month, or when i use “all(dates)” it will just show the maximum for all months.

The current formula for my churn % is:

Churnrate MRR = CALCULATE(([Cumulative Lost MRR]-[Cumulative Lost MRR LM])/[Cumulative 
  Won MRR LM])

How I tried to apply the pattern:
Churnrate MRR new =
var churnrate = CALCULATE(([Cumulative Lost MRR]-[Cumulative Lost MRR LM])/[Cumulative Won MRR LM])
return
SUMX(
SUMMARIZE(Dates,Dates[MonthYear],
“churn”,churnrate),
churnrate
)

Is there a course on how to fix the totals for churn with churn rate/cumulative totals?

Hello @Laila92,

In examples like this, please post a sample PBIX so that your question will be answered in a timely fashion. Here is something I would try out first, but If you don’t get the correct results , please post a sample PBIX file.

** It is definitely a best practice to use DIVIDE, rather than / whenever possible. It has to do with performance in DAX**

Churnrate MRR =
VAR StepOne = [Cumulative Lost MMR] - [Cumulative Lost MRR LM]
RETURN
    DIVIDE ( StepOne, [Cumulative Won MRR LM] )

Here is a good video from Sam to review regarding DIVIDE:

Thanks
Jarrett

Thanks for posting your question @Laila92. To receive a resolution in a timely manner please make sure that you provide all the necessary details on this thread.

Here is a potential list of additional information to include in this thread; demo pbix file, images of the entire scenario you are dealing with, screenshot of the data model, details of how you want to visualize a result, and any other supporting links and details.

Including all of the above will likely enable a quick solution to your question.