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've calculated a running total of the views for a report. I used this dax measure
Running total =
CALCULATE (
[Total views],
FILTER (
ALL ( testCalender ),
testCalender[Date] <= MAX ( testCalender[Date] )
)
)
This gives me a running total
But I need the total to stop at 31 dec 2023 and to restart on january 1 2024.
Thx for having a look at my question!
Solved! Go to Solution.
Hi @jochendecraene ,nice method!
And you can also consider using the following code to create a Measure.
My Sample:
Running total = SUMX(FILTER( ALL('Table'), 'Table'[Date] <= MAX ( 'Table'[Date] )
&& YEAR ('Table'[Date]) = YEAR (MAX ('Table'[Date]))),
[Total View]
)
Result is as below.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jochendecraene ,nice method!
And you can also consider using the following code to create a Measure.
My Sample:
Running total = SUMX(FILTER( ALL('Table'), 'Table'[Date] <= MAX ( 'Table'[Date] )
&& YEAR ('Table'[Date]) = YEAR (MAX ('Table'[Date]))),
[Total View]
)
Result is as below.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@jochendecraene , Please find similar explanantion
Solved: Running Total per month restarting every year - Microsoft Fabric Community
Please accepta as solution if it helps
Proud to be a Super User! |
|
that is not working in my scenario
It works fine when I use the datavalue in the view fact table, and don't use the related calender table.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |