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!
I have a simple Measure that contains the running total of certain data that is counted by days. It was generated by using the following DAX code:
Thx in advance!
Hi @GRG2001 ,
This code will perform a cumulative calculation for each weekend grouping, and this result applies to the sample data scenario I created. I'm not sure if there are other filters in your data or if the fields are not in the same table, so you can change my code to your own table name and field names.
If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @GRG2001 ,
Here are the steps you can follow:
1. Create measure.
Medida =
SUMX(
FILTER(
ALL('Table'),
YEAR('Table'[Date_mes])=YEAR(MAX('Table'[Date_mes]))&&
WEEKNUM('Table'[Date_mes],2)=WEEKNUM(MAX('Table'[Date_mes]),2)&&
'Table'[Date_mes]<=MAX('Table'[Date_mes])),[Count])
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you for the answer.
The running total restarts every week. Is that a way that I can modify the code you posted to keep the running total continue throughout the weeks?
Thanks again.
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |