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
manic2003
New Member

Trying to return True or False based on ISBLANK and DATEDIFF

Hi all,

 

I am trying to have a column populate with TRUE or FALSE based on another column "Owner" being blank AND the created time (of the service ticket) is greater than 4 hours.

 

I currently have this :-

 

SLA Compliant? = IF(AND(ISBLANK([owner]),(DATEDIFF([createddatetime],HOUR(NOW()),HOUR)>4)),TRUE,FALSE)

 

I receive no errors in the code but it i can see rows in my table that have a blank column and the difference in time between CreatedDateandTime and "now" is greater than 4 hours in these entries and so i expect a "True" but i only get "False" for everything!

 

Hopefully someone can help!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@manic2003,

Please check if the following DAX returns your expected result.

SLA Compliant? = IF(AND([owner]="",(DATEDIFF([createddatetime],NOW(),HOUR)>4)),TRUE,FALSE)
1.JPG

Regards,
Lydia

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

@manic2003,

Please check if the following DAX returns your expected result.

SLA Compliant? = IF(AND([owner]="",(DATEDIFF([createddatetime],NOW(),HOUR)>4)),TRUE,FALSE)
1.JPG

Regards,
Lydia

TBrowne
Advocate I
Advocate I

Have you tried it without the "HOUR" on the NOW function? I believe the issue is there. 

Hi TBrowne.... Yes unfortunately i had tried it with and without and it is the same result....

Ok. Have you added a column with only the DATEDIFF for debugging purposes? It must not be calculating that part correctly, maybe try with and without the HOUR on the NOW function on the debugging column as well. 

Hi Tbrowne it appears that ISBLANK is the problem and when i do Lydia's suggesting of " " then it works fine!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.