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
Hi All,
I have a column called entry date in Table A and created a date table called DateDim having column Date.
When I'm creating the below measure I'm getting error.
Solved! Go to Solution.
Hi, @Anonymous
According to your description, you want to get the date diff between the max date of your selected date and the 'Process Detail'[entry_date], you can try my method:
Datediff =
var _selecteddate=MAXX(ALLSELECTED('DateDim'),'DateDim'[Date])
return
DATEDIFF(MAX('Process Detail'[entry_date]),_selecteddate,DAY)
And You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
According to your description, you want to get the date diff between the max date of your selected date and the 'Process Detail'[entry_date], you can try my method:
Datediff =
var _selecteddate=MAXX(ALLSELECTED('DateDim'),'DateDim'[Date])
return
DATEDIFF(MAX('Process Detail'[entry_date]),_selecteddate,DAY)
And You can download my test pbix file here
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , you need to use aggregation and row context
refer my blog : https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Difference-Across/ba-p/934397#M451
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!