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
Anonymous
Not applicable

Problems with comparing time with If formula

For a project i have compare times. My formula looks like this 

SophieHorlings_0-1679920497314.png

And the Data looks like this: 

SophieHorlings_1-1679920519137.png

Both column have the same following settings 

SophieHorlings_2-1679920577020.png

I would expect that if test is before test2 that it would give a 1 instead of a 0. I have searched online, but cannot find what possibily is going wrong, can someone help me? 

1 REPLY 1
Anand24
Super User
Super User

Hi @Anonymous ,
Try below dax in calculated measure:

Anand24_0-1679922461939.png

 

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

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.