Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello!
I would need help to know how I can achieve the annual cumulative formula.
And what I need is to make a cumulative where I leave a fixed base month, for the cumulative of 2023 it has to take December 2022 as a base
With the DATESYTD measure, it allows me but compares me month to month, it took me October 2022-October 2023
Does anyone know how I could do it?
Thank you
Solved! Go to Solution.
Hi @Maurosaa93 ,
Have you solved your problem?
If you must need use measure, you can modify DAX as follows:
_Value1 =
VAR CurrentYear = YEAR(MAX('Table'[Y-M]))
VAR CurrentMonth = MONTH(MAX('Table'[Y-M]))
RETURN
CALCULATE(
SUM('Table'[Value]),
FILTER(
ALL('Table'),
(YEAR('Table'[Y-M]) = CurrentYear && MONTH('Table'[Y-M]) <= CurrentMonth) || (YEAR('Table'[Y-M]) = CurrentYear - 1 && MONTH('Table'[Y-M]) = 12)
)
)
The output is the same:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Maurosaa93 ,
If I understand you correctly, you want to do monthly accruals and restart accruals across years using December of the previous year as the starting data. Please try this way.
Here is my sample data:
Use this DAX to create a calculated column:
_Value =
VAR CurrentYear = YEAR('Table'[Y-M])
VAR CurrentMonth = MONTH('Table'[Y-M])
RETURN
CALCULATE(
SUM('Table'[Value]),
FILTER(
ALL('Table'),
(YEAR('Table'[Y-M]) = CurrentYear && MONTH('Table'[Y-M]) <= CurrentMonth) || (YEAR('Table'[Y-M]) = CurrentYear - 1 && MONTH('Table'[Y-M]) = 12)
)
)
And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Maurosaa93 ,
Have you solved your problem?
If you must need use measure, you can modify DAX as follows:
_Value1 =
VAR CurrentYear = YEAR(MAX('Table'[Y-M]))
VAR CurrentMonth = MONTH(MAX('Table'[Y-M]))
RETURN
CALCULATE(
SUM('Table'[Value]),
FILTER(
ALL('Table'),
(YEAR('Table'[Y-M]) = CurrentYear && MONTH('Table'[Y-M]) <= CurrentMonth) || (YEAR('Table'[Y-M]) = CurrentYear - 1 && MONTH('Table'[Y-M]) = 12)
)
)
The output is the same:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you please share your data or your model ?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |