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
Firewtc343
Regular Visitor

Calculated column help

I would like to add a calculated column that would look at the 3 previous date\time stamps and calculate the number of working hours that passed.

 

In my table I have a column name sp. chan that I would like to know how many working hours (7 am to 12 am) it took that area to complete the product. there is 3 other column that represents other areas that the product MAY have gone thought. their "clock does not start until the prior area that the product went through has completed their work. all units will receive a match and mark, but only some units will receive a customs and or stiffen date/time. 

It basically needs to look in the M & M, custom, and stiffen column for the last time work was completed and calculate the hours from there to Sp. Chan date/time

 

Any help would be appreciated

 

Firewtc343_2-1614272096006.png

 

Firewtc343_1-1614272055432.png

 

 

 

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Firewtc343 ,

Based on your description, I have created a sample file but not certain what is your expected output, so wants to know more details about this issue.

 

According to my current understanding, do you want to calculate the maximum value of the three columns and calculate the time difference with the last column? If so, the time difference will be negative in the sample sometimes. How to deal with it  in this case?
In addition, it is still not clear what your 7-12 AM standard refers to.

 

Could you please consider giving a specific example for sample data to illustrate your expected output so that we can better help you.

 

Best Regards,
Community Support Team _ Yingjie Li

edhans
Super User
Super User

We need data and expected results.

 

How to get good help fast. Help us help you.

How To Ask A Technical Question If you Really Want An Answer

How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.