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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Experts,
I am having a scenario, Assume have only one measure and that should show current year YTD i.e June 2023 and Previous Year YTD till June 2022 only. How would I made my measure should show for the Current Year YTD vs. Previous Year YTD in the same measure dynamically? Below is the ssnapshot that my measure is displays the Current Year 2023 YTD is looks good, but for 2022 it is summing till Dec 2022. please help?
Hi @Anonymous ,
Maybe the function SAMEPERIODLASTYEAR could help you.
It returns a table that contains a column of dates shifted one year back in time from the dates in the specified dates column, in the current context.
Besides, you can use something like this:
Measure =
VAR _a =
MAXX ( ALL ( 'Table'[Date] ), [Date] ) //get the max date
VAR _b =
EOMONTH ( _a, -12 ) //end of the same month in last year
RETURN
CALCULATE (
SUM ( [Value] ),
FILTER ( ALL ( 'Table' ), [Date] <= _b && YEAR ( [Date] ) = YEAR ( _a ) - 1 )
)
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @amitchandak please help on this, you helped me in multiple work arounds. Thanks 🙂
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |