This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi Community..!!
Please refer above pic,
I am calculating YTD here,
1. I want to display Feb result to march and march result to april and so on.
2. I want to display Feb result to April and March result to May and so on.
I have used below logic for calculating current month YTD.
Solved! Go to Solution.
Thank u @rajendraongole1
Its correct ,
just slight change in the calculation as per my requirement,
Hi @Anonymous ,
You can use OFFSET to get the YTD before the current row or before that but he exact formula will vary depending on the dimension in the visual.
YTD sum =
CALCULATE ( [Sales], DATESYTD ( d_Dates[Date] ) )
YTD LM =
CALCULATE (
[YTD sum],
OFFSET (
-1,
ALLSELECTED ( d_Dates[Year], d_Dates[Month Short], d_Dates[Month Number] ),
ORDERBY ( d_Dates[Month Number] )
)
)
YTD 2LM =
CALCULATE (
[YTD sum],
OFFSET (
-2,
ALLSELECTED ( d_Dates[Year], d_Dates[Month Short], d_Dates[Month Number] ),
ORDERBY ( d_Dates[Month Number] )
)
)
Please see attached sample pbix.
Hi @Anonymous - can you try with below logic
Shifted YTD Actuals =
VAR CurrentDate = MAX('Date'[Date])
VAR ShiftedDate = EOMONTH(CurrentDate, -1)
RETURN
CALCULATE(
[YTD Actuals],
DATESINPERIOD('Date'[Date], ShiftedDate, MONTH, 1)
)
it works for month, instead of month replace with Year and check.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Proud to be a Super User! | |
Thank u @rajendraongole1
Its correct ,
just slight change in the calculation as per my requirement,
Great! @Anonymous
If this post helps, then please consider Accept it as the solution or give a kudos
Proud to be a Super User! | |
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 49 | |
| 47 | |
| 41 | |
| 21 | |
| 19 |