Cumulative running totals issue

Trying to do the cumulative running total for fiscal year that ends 04/30.

Issue is the totals are going wrong as i choose the account on the filter and the totals doesn’t add up properly.

Data is in this form

image

Totals.pbix (27.3 KB)

expected result for fy 2022 for Acct 4025 is

image

Hello @train,

Thank You for posting your query onto the Forum.

Firstly, it’s a recommended best practice to have a compact date table inside the data model and our expert has already created the M Code for that which generates that table. Below is the link of that post provided from where you can copy and paste the code in your file.

Secondly, the reason why you were not able to see the results is because of the above mentioned point. Since in this case, you want to analyze the results based on Financial Year, inside the date table you need to have a column with that criteria because filtering the results based on normal calendar year is different from financial year. And therefore, I’ve added the revised date table inside the PBIX file and replaced the slicer with the “Financial Year” field and able to see the results correctly. Below is the screenshot of the final results provided for the reference -

I’m also attaching the working of the PBIX file for the reference purposes.

Hoping you find this useful and meets your requirements that you’ve been looking for.

Thanks and Warm Regards,
Harsh

Totals - Harsh.pbix (82.8 KB)

1 Like