March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |