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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Sonyat810
Helper III
Helper III

I need HELP! I'm trying to calculate the difference between Time

I am tying to calculate the difference between time. I have a coulmn with date/time and a cloumn with time. this is what I have so far, but it isn't working. I got an error saying I need to convert using Values.

 

Based DATEDIFF =
VAR _MINTimestamp =
    MINX (
        FILTER (
            ALL ( 'Master' ),
            'Master'[Actual] = MAX ( 'Master'[Actual] )
                && 'Master'[Date]= MAX ( 'Master'[Date] )
        ),
        'Master'[Time]
    )
VAR _MAXTimestamp =
    MAXX (
        FILTER (
            ALL ( 'Master' ),
            'Master'[Actual]= MAX ( 'Master'[Actual] )
                && 'Master'[Date]= MAX ( 'Master'[Date])
        ),
        'Master'[Time].[Date]
    )
RETURN
    DATEDIFF ( _MINTimestamp, _MAXTimestamp, MINUTE )
1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @Sonyat810 

 

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/td-p/144...

 

Please provide sample data.  It's very hard to visualize data just by looking at code.

 

regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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