Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

using DATEDIFF function not using DATE fields

I'm trying to use the DATEDIFF function, however its not giving me the option to select my fields which are formatted as DATE. 

 

DATEDIFF(DATE1, DATE2, Interval) 

For DATE1 I have a table and field  = Campaigns[StartDate] - this does not show up when I try to use this for DATE1. The only options that populate are other measures. None of the DATE fields I have in the table show up. 

 

I hope this makes sense. Again - the fields are of the type DATE.  For DATE2 - I would like to use TODAY(). Ultimately, I'm trying to calculate the number of days between TODAY and the StartDate field. 

 

Thanks for your help! 

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

@Anonymous ,

 

Are you using measures ? If yes, try using this column inside a SELECTEDVALUE function.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
camargos88
Community Champion
Community Champion

@Anonymous ,

 

Keep in mind that when you work with measures you need to check if the function expects scalar values or not. Mostly of calculations functions you need to work with scalar values.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



camargos88
Community Champion
Community Champion

@Anonymous ,

 

Are you using measures ? If yes, try using this column inside a SELECTEDVALUE function.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

That worked - thank you. 

This is what I used - 

days between = DATEDIFF(SELECTEDVALUE(Campaigns[startDate]), TODAY(),DAY)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors