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,
I have a report in which I have created one measure (completed date) with following DAX formula:
Solved! Go to Solution.
@Anonymous , change measure like and change its data type to date
Measure = IF(CALCULATE(COUNTROWS(SampleData),FILTER(SampleData,SampleData[Job Completion Date]=BLANK())) > 0, blank(), MAX(SampleData[Job Completion Date]))
@Anonymous , change measure like and change its data type to date
Measure = IF(CALCULATE(COUNTROWS(SampleData),FILTER(SampleData,SampleData[Job Completion Date]=BLANK())) > 0, blank(), MAX(SampleData[Job Completion Date]))
@Anonymous , You can get it like this
datediff(max(G6_SampleData[Started Date]), [Measure], DAY)
But you have force a row context using summarize or values example //assume JOB ID
Sumx(values(G6_SampleData[JOB ID]), datediff(max(G6_SampleData[Started Date]), [Measure], DAY))
Averagex(values(G6_SampleData[JOB ID]), datediff(max(G6_SampleData[Started Date]), [Measure], DAY))
refer
Thanks Amit,
But when I use your provided DAX formula it gives me an error that cannot convert string to Date.
Even if use format it gives me the same error.
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!