Forum Discussion
Calculating Running Total using Quick measure and am getting incorrect values
- 2 years ago
Hi,
Try this approach
- Create a Calendar Table with calculated column for Year, Month name and Month number
- Sort the Month name by the month number
- Create a relationship (Many to One and Single) from the Date column of the Fact table to the Date column of the Calendar Table
- To your visual, drag Year and Month from the Calendar Table
- Write this measure
Measure = CALCULATE([Total Revenue],datesbetween(calendar[date],edate(min(calendar[date]),-11),max(calendar[date])))Hope this helps.
- Anonymous2 years ago
Thanks for the reply from Ashish_Mathur and vicky_ , please allow me to provide another insight:
Hi, Isaiahj09
Can you tell me if your problem is solved? If yes, please accept their reply as solution.Your dax is currently working fine in my test environment, so I'm guessing that the reason why your run is not what you expect may be due to your "Total Revenue" measure, and here are my measurements:
1.First I have created the following table and the column names and data are the data you have given:
2. Below are the measure I've created for your needs:
Total Revenue = SUM('Alteryx TB'[1])3.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Of course, you can also try updating your desktop version to see if that solves the problem:
Download Microsoft Power BI Desktop from Official Microsoft Download Center
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from Ashish_Mathur and vicky_ , please allow me to provide another insight:
Hi, Isaiahj09
Can you tell me if your problem is solved? If yes, please accept their reply as solution.
Your dax is currently working fine in my test environment, so I'm guessing that the reason why your run is not what you expect may be due to your "Total Revenue" measure, and here are my measurements:
1.First I have created the following table and the column names and data are the data you have given:
2. Below are the measure I've created for your needs:
Total Revenue = SUM('Alteryx TB'[1])
3.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Of course, you can also try updating your desktop version to see if that solves the problem:
Download Microsoft Power BI Desktop from Official Microsoft Download Center
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you !
It seems it was indeed an issue with the dates in my original table.