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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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