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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Gabooski
New Member

Help with DAX for DATEDIFF that checks another column value

Hello,

 

I am trying to create a custom column that shows DATE diff between start & end date values > two hours, and based on a certain status value of "In-Progress" (all within same table), but I am getting #ERROR message - please can soomeone help me with the correct syntax?

 

My attempt is as follows:

Time > 2 hours and Status of "In Progress" = IF(DATEDIFF('XXX Data'[Date Created],'XXX'[Date & time first responded to],MINUTE)>120,"Yes","No", 'XXX Data'[Status]="In-Progress")
 
Thank you in advance for the help.
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

Time > 2 hours and Status of "In Progress" =
IF (
    DATEDIFF (
        'XXX Data'[Date Created],
        'XXX Data'[Date & time first responded to],
        MINUTE
    ) > 120
        && 'XXX Data'[Status] = "In-Progress",
    "Yes",
    "No"
)

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Try

Time > 2 hours and Status of "In Progress" =
IF (
    DATEDIFF (
        'XXX Data'[Date Created],
        'XXX Data'[Date & time first responded to],
        MINUTE
    ) > 120
        && 'XXX Data'[Status] = "In-Progress",
    "Yes",
    "No"
)

Awesome @johnt75 , that got it - thanks so much for the help!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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