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
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
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.