Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
May someone help me with a DAX measure to have cumulative sales for the month and this needs to pull everything I move my visual by month
Here is how my dataset is set up:
I have total sales for the currect year measure, calender date hierarchy
The total sales measure here :
Solved! Go to Solution.
Hi @Anonymous ,
To create a cumulative (running total) sales measure based on your existing Total Actual measure, and have it work as you move your visual by month (e.g., using the calendar hierarchy), you can define a new measure like this:
Cumulative Sales =
CALCULATE(
[Total Actual],
FILTER(
ALLSELECTED('Sales Data file xlsx'[Date]),
'Sales Data file xlsx'[Date] <= MAX('Sales Data file xlsx'[Date])
)
)
Hi @Anonymous
I wanted to follow up since I haven't heard from you in a while. Have you had a chance to try the suggested solutions?
If your issue is resolved, please consider marking the post as solved. However, if you're still facing challenges, feel free to share the details, and we'll be happy to assist you further.
Looking forward to your response!
Best Regards,
Community Support Team _ C Srikanth.
Hi @Anonymous
I wanted to follow up since I haven't heard from you in a while. Have you had a chance to try the suggested solutions?
If your issue is resolved, please consider marking the post as solved. However, if you're still facing challenges, feel free to share the details, and we'll be happy to assist you further.
Looking forward to your response!
Best Regards,
Community Support Team _ C Srikanth.
Hi @Anonymous ,
To create a cumulative (running total) sales measure based on your existing Total Actual measure, and have it work as you move your visual by month (e.g., using the calendar hierarchy), you can define a new measure like this:
Cumulative Sales =
CALCULATE(
[Total Actual],
FILTER(
ALLSELECTED('Sales Data file xlsx'[Date]),
'Sales Data file xlsx'[Date] <= MAX('Sales Data file xlsx'[Date])
)
)
Hi @Anonymous
We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please Accept as Solution to help others benefit in the community.
Thank you.
If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.
Hi @Anonymous
Place your Cumulative Sales measure in a line chart.
Use 'Sales Data file xlsx'[Date] from the Date Hierarchy as the X-axis.
As you drill down from Month → Day, the cumulative sales should adjust accordingly.
If the above information helps you, please give us a Kudos and marked the Accept as a solution.
Best Regards,
Community Support Team _ C Srikanth.
Thank you this is showing me the correct value, now how do I have by day in my line chart
I have date hierarchy which has, Year,Quarter, Month and Day
@Anonymous , Try using
Cumulative Sales MTD =
CALCULATE(
[Total Actual],
DATESMTD('Sales Data file xlsx'[Date])
)
Proud to be a Super User! |
|
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 5 | |
| 4 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |