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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MCALDERON
Frequent Visitor

Data type - Date Time to $

Hi, 

 

I need a little help, I have a Custom column "Run Time" that has the operation "End - Start" and the result is: 0.00:43:00. With this result I need to create a new custom column "Run Time Cost" with the operation "Run Time * 4" this 4 means 4$, so I need the result to be shown as Fixed Decimal Number. 

 

How can I solve this one? Thanks in advanced. 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @MCALDERON ,

 

According to your description, customize a column, first find the share of the start-end column in the day, and then multiply the result by 4 to get the time cost.

 

vhenrykmstf_0-1634003778720.png

days_ = (MINUTE('Table'[Column1])/(24*60))*4


If the problem is still not resolved, please describe your needs again, and the results that are expected to be provided. I will get back to you as soon as possible.


Best Regards,
Henry


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

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @MCALDERON ,

 

According to your description, customize a column, first find the share of the start-end column in the day, and then multiply the result by 4 to get the time cost.

 

vhenrykmstf_0-1634003778720.png

days_ = (MINUTE('Table'[Column1])/(24*60))*4


If the problem is still not resolved, please describe your needs again, and the results that are expected to be provided. I will get back to you as soon as possible.


Best Regards,
Henry


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

mahoneypat
Employee
Employee

Convert your duration column to a decimal number, which will be in days.  From there, multiply by 24 to get hours and then multiply by 4 to get your result.


Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.