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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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