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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Zack007
Frequent Visitor

If condition with time duration

Hello,

Please help to have this duration negative calculation in the query, in Excel I used to use the function below.

The first is excluded from the sum of durations and automatically gets that -100 ( by default )to be identified as it was excluded

If I keep both lines as it is the sum of the two values 6:11:39 (Not correct) instead of 0 which is correct.

 

PS: It is a database extraction that I use in a daily manner. 

 

Zack007_1-1670944846002.png

 

 Thank you 😊

 

1 ACCEPTED SOLUTION

table is the table name, you can change it to your table name and have a try.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

10 REPLIES 10
Zack007
Frequent Visitor

Hello,

 

As the forum's body does not support either .csv or .xlsx files, you could find below a part of the extraction as a table.

 

CorrectionUserNamePrd. orderOrder descr. (PO)Operation No.Operation Descr.Operation versionMachine No.Machine descr.FromUntilCapacity [%]Duration [h]Booking type
1Z003R91EEl Harchaoui, Said5.1E+09GP47567200-00701100-Demolding/Aux mat removal1LEWEB132G132 Leading Edge Web04-12-22 22:1105-12-22 1:17-100,003:05:49Production time
0Z003R91EEl Harchaoui, Said5.1E+09GP47567200-00701100-Demolding/Aux mat removal1LEWEB132G132 Leading Edge Web04-12-22 22:1105-12-22 1:17 3:05:50 
0Z003R91EEl Harchaoui, Said5.1E+09Meeting00-0060break1XW132_PSG132 Prefabs Shells NP-NR05-12-22 1:1705-12-22 2:05 0:48:45 
0Z003R91EEl Harchaoui, Said5.1E+09GP47567200-00701100-Demolding/Aux mat removal1LEWEB132G132 Leading Edge Web05-12-22 2:0505-12-22 4:31 2:25:46 
1Z003R91EEl Harchaoui, Said5.1E+09GP47567200-00701100-Demolding/Aux mat removal1LEWEB132G132 Leading Edge Web06-12-22 22:1307-12-22 3:36-100,005:22:52Production time
0Z003R91EEl Harchaoui, Said5.1E+09GP47567200-00701100-Demolding/Aux mat removal1LEWEB132G132 Leading Edge Web06-12-22 22:1307-12-22 3:36 5:22:53 
0Z003R91EEl Harchaoui, Said5.1E+09Meeting00-0240Waiting Due To Crane Movements1XW132_PSG132 Prefabs Shells NP-NR07-12-22 3:3607-12-22 5:54 2:17:59 
0Z003R91EEl Harchaoui, Said5.1E+09Meeting00-0010Meeting1XW132_PSG132 Prefabs Shells NP-NR07-12-22 22:0207-12-22 22:04 0:01:53 
1Z003RJZCOu Taleb, Mohamed5.1E+09GP47568400-0030700-Lay up1S_CAP132G132 Suction Cap05-12-22 7:4305-12-22 11:43100,004:00:05Production time
1Z003RJZCOu Taleb, Mohamed5.1E+09GP47568400-0030700-Lay up1S_CAP132G132 Suction Cap05-12-22 7:4305-12-22 13:51-100,006:08:06Production time
0Z003RJZCOu Taleb, Mohamed5.1E+09GP47568400-0030700-Lay up1S_CAP132G132 Suction Cap05-12-22 7:4305-12-22 13:51 6:08:06 
0Z003RJZCOu Taleb, Mohamed5.1E+09Meeting00-0010Meeting1XW132_PSG132 Prefabs Shells NP-NR06-12-22 5:5606-12-22 8:57 3:00:59 
1Z003RJZCOu Taleb, Mohamed5.1E+09GP47568400-0020600-In-line preparation1S_CAP132G132 Suction Cap06-12-22 8:5706-12-22 13:41-100,004:43:07Production time
0Z003RJZCOu Taleb, Mohamed5.1E+09GP47568400-0020600-In-line preparation1S_CAP132G132 Suction Cap06-12-22 8:5706-12-22 13:41 4:43:07 

 

which columns are the column M and column N?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Please try to copy and paste this data into an excel sheet it will give the right separation  

Hello,

Column N is [[ Duration [h] ]], Column M is [[ Capacity [%] ]].

Many Thanks

 

is this what you want?

Column = if('Table'[Name]=0,'Table'[Capacity [%]]]*'Table'[Duration [h]]]/100)*24




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Yes almost but not [Name] it's [Correction]

 

   ** Column = if('Table'[Name]=0,'Table'[Capacity [%]]]*'Table'[Duration [h]]]/100)*24 **


When I test it the app can not finde 'Table'  see screenshot below

Zack007_0-1671097850567.png

 

Many thanks

 

 

table is the table name, you can change it to your table name and have a try.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you very much, it's working😊😊

Zack007
Frequent Visitor

Hello,

Any solutions please.

Thank you.

ryan_mayu
Super User
Super User

could you pls provide the sample data(not the screenshot)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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