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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Chris-Mc
Frequent Visitor

New measure - minutes between arrival date time and NOW

hi
I have a direct query where I need to create a measure to find the difference between "adm-date-time" and "Now date time" in minutes
"adm-date-time" is from the diret query and "Now date time" has been created as a measure using NowDateTime = NOW()
I have tried the DATEDIFF function but cannot add the "adm-date-time" to the formula because it is not a measure. 
I have searched through the forums but cant find a solution.  Can anyone assist?
 
ChrisMc_0-1693533541423.png

 

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

I think you're on the right track already, but you'll need to wrap "adm-date-time" in a SELECTEDVALUE() function. In the end, the formula should look like:
Difference = DATEDIFF(SELECTEDVALUE([adm-date-time]), NOW(), MINUTES)

View solution in original post

2 REPLIES 2
vicky_
Super User
Super User

I think you're on the right track already, but you'll need to wrap "adm-date-time" in a SELECTEDVALUE() function. In the end, the formula should look like:
Difference = DATEDIFF(SELECTEDVALUE([adm-date-time]), NOW(), MINUTES)

thanks Vicky.  Such a simple solution. Much appreciated

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.