Dear experts,
I would like some help and advice in calculating the average of a running total on month-to-month basis based on the months completed. In the attached file, the highlighted columns show the output I am expecting, however not able to write DAX for that.
Year-Month is based on the date dimension table and other columns are measures calculated based on different tables and daily transactions. Stock data is of month-end.
Can you please help me with the DAX? PowerBI model is too complex to upload here. Therefore, only sending the excel file.
Average running total.xlsx (13.2 KB)
1 Like
Hey,
Hope you are doing well!

Sample.pbix (50.3 KB)
here you can go
Thanks,
Pankaj
Thank you, pankaj. It works. I just noticed that if there is no value for consumption for a particular month (April 2022 in my model), the running total of consumption is calculated as 0 for April 2022 instead of the same value as for March 2022 running total. Can you please advise on how that can be fixed?
Regards,
Nimish
1 Like
You can enable on Year month col show item with no data
or also you can create measure based on errors handling function
Hello @a_nimish
Did the responses above help solve your query?
If not, can you let us know where you’re stuck and what additional assistance you need?
If it did, please mark the answer as the SOLUTION by clicking the three dots beside Reply and then tick the check box beside SOLUTION
Thank you