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 community!
Have an issue to ask you help with.
By the code below I'm trying to get value for the last available day in the previouse year (as you see the hardcoded part - it's Dec 28).
LastYear Bill FTE =
CALCULATE (
SUM (Billed_FTE[BilledFTE]),
FILTER (
ALLEXCEPT (Billed_FTE, Billed_FTE[Client] ),
Billed_FTE[Date] = DATE (2018,12,28)
)
)Actually, it works. But I need to get rid from that hardcoded part, because next year this date may be different. So I created a new mesure, that gives me a result - 28-Dec-18
LastYearLastDate =
CALCULATE (
LASTDATE ( Billed_FTE[Date] ),
FILTER (
ALLEXCEPT ( Billed_FTE, Billed_FTE[Client] ),
Billed_FTE[Year] = MAX ( Billed_FTE[Year] ) -1
)
)But when I change my hardcoded date to this [LastYearLastDate] mesure - it doesnt work properly. Looks like there is a date formatting issue and power BI don't recognize my [LastYearLastDate] mesure as a date or I don't know.
Please, help! 🙂
Solved! Go to Solution.
Hi @Anonymous ,
Because embed measure into a measure may occur some error regardless of date format, you can try to calculate the date into a var before using it to filter like following.
LastYear Bill FTE =
VAR d = [BilledFTE]
RETURN
CALCULATE (
SUM ( Billed_FTE[Client] ),
FILTER ( ALLEXCEPT ( Billed_FTE, Billed_FTE[Client] ), Billed_FTE[Date] = d )
)
BTW, pbix as attached.
Best regards,
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
Hi @Anonymous ,
Because embed measure into a measure may occur some error regardless of date format, you can try to calculate the date into a var before using it to filter like following.
LastYear Bill FTE =
VAR d = [BilledFTE]
RETURN
CALCULATE (
SUM ( Billed_FTE[Client] ),
FILTER ( ALLEXCEPT ( Billed_FTE, Billed_FTE[Client] ), Billed_FTE[Date] = d )
)
BTW, pbix as attached.
Best regards,
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
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!