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
Pick
Helper II
Helper II

Search Table for datetime events and show durations

Hi,

 

   I have a table below.   This table is for one order only the full table has may order_nos.   I want to create a new table to show the duration between the earliest Start_Time of every Unit and and End_time based on a selectable CONTROL_STATEGY.  IN this way each Unit will have one row with a start time and end time.

APM Duration.JPG

  Thanks

   Ian

4 REPLIES 4
richbenmintz
Resident Rockstar
Resident Rockstar

Hi @Pick ,

 

Can you provide a couple things:

1. Sample Data Set

2. the expect result of the derived table.

 

You can accomplish this task either through data transformation in Power Query or the creation of a summary table using a Dax table formula



I hope this helps,
Richard

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

Proud to be a Super User!


Hi,

 

  Hi Thanks for the reply.  Source data would be (but there would be multiple Order_no with same CONTROL_STRATEGYs

 

APM Duration.JPG

 

 Output Table would be as follows for each order_No:

 

APM Duration result.JPG

 

  Thanks

 

   Ian

Min, max, firstdate, lastdate and on start_date and end_date should work as long as you have filter and context.

 

Max(start_date), min(start_date)

 

If need you can add context using values, allexcept or summarize 

like 

calculate(Max(start_date),values(table[CONTROL_STRATEGY]))

calculate(Max(start_date),allexcept(table,table[order-number],table[CONTROL_STRATEGY])

 

https://community.powerbi.com/t5/Desktop/Allexcept-from-two-tables/td-p/255925

 

meausre = maxx(Summarize(table,table,table[order-number],table[CONTROL_STRATEGY]),"_max",Max(start_date)),[_max])

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @Pick 

One request, can you provide the data in a table and not a screen cap, i can then mock it up in a pbix file



I hope this helps,
Richard

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

Proud to be a Super User!


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.