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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How to minus the Date/Time format ?

Hi All,

 

I created in table Dim Date an calculated column called GetTime. This GetTime ( formula Gettime = NOW() )  gives a current time from my PowerBI Desktop.

 

The current time is now at 13:36 and i want to make a measure that calculate the GetTime minus the roo_ID  number 1 from another table Fact WaitingRoom.

 

So the expected output when i choose/filter the roo_id number 1 is : 13:36 minus 4 minutes which result 13:32.

 

Which formula should i use to calculate this? Thanks in advances.

 

 

2017-07-26 13_58_20-Zillion Insights - Power BI Desktop.png

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

You can try this formula in your scenario.

ResultMeasure =
MIN ( 'Table1'[GetTimeCol] )
    + SIGN ( MIN ( 'Table1'[Time] ) ) * TIME ( 0, ABS ( MIN ( 'Table1'[Time] ) ), 0 )

I would suggest that we create a calculated column instead, which would be simpler.

 

ResultCol =
[GetTimeCol]
    + SIGN ( [Time] ) * TIME ( 0, ABS ( [Time] ), 0 )

How to minus the DateTime format.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Could you please mark the proper answer as solution or share the answer if it's convenient for you? That will be a help to the others.

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

You can try this formula in your scenario.

ResultMeasure =
MIN ( 'Table1'[GetTimeCol] )
    + SIGN ( MIN ( 'Table1'[Time] ) ) * TIME ( 0, ABS ( MIN ( 'Table1'[Time] ) ), 0 )

I would suggest that we create a calculated column instead, which would be simpler.

 

ResultCol =
[GetTimeCol]
    + SIGN ( [Time] ) * TIME ( 0, ABS ( [Time] ), 0 )

How to minus the DateTime format.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vanessafvg
Super User
Super User

@Anonymous not sure if this would work but you could try

 

 

column =
NOW () +  time (0, 4,0)

 

 

https://msdn.microsoft.com/en-us/library/ee634564.aspx





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

@vanessafvg

 

Thanks for your response. Your formula works perfect when we have a delay of 4 minutes on some waiting room.

 

But what if we have a early estimated time of -4 minutes?  How can i calculate this?

 

 

i am not sure would that be held in your rootid?

 

 

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors