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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
123CaM321
Frequent Visitor

Pulling info from event based on highest time in each category

So I have data similar to below

 

123CaM321_0-1667014559833.png

Events occur, and time for event is calculated based on timestamp. The event gets a category (1 of 3 choices)

 

I have a dashboard that slices by year,month,week and shows data based on the events within that timeframe. What I need to do is find the longest event for each category based on my chosen period on the dashboard. I've been stuck on this for days and just can't work it out.

 

Creating a matrix with category in rows and using a measure to calculate MAX of event time will give me the top of each category however I've then got no other info on the event, only the time

 

Really hope someone can help. Thanks!

 

4 REPLIES 4
123CaM321
Frequent Visitor

An update on how I've achieved this in the meantime. I see this as a dirty fix as there is the potential (even though highly unlikely) for a duplicate time to occur.

 

 - Filter the table by one of the categorys and find max time in breakdown. Save variable

 - Use variable to filter the table again, this time using the number found (ideally occurs once so ends up with a one row table

- concatenate the info I require from this returned row

- return result

123CaM321
Frequent Visitor

Hi Ashish.

 

Expected results from this data would be

Technological - 74 - Overcap_reclose

Organisational - 756 - Checkweigher_2

Technical - 128 - Sleever

 

TIMEDOWNTIMEMACHINECOMMENTACTIONSUB CATEGORYCATEGORY
24/10/2022 18:51756Checkweigher_2Line down for PRE FSI audit cleaningThis should be blocked out as planned downtime?OperationalOrganizational
26/10/2022 11:10270Filler  OperationalOrganizational
16/10/2022 8:40128SleeverExcessive rejects at sleeverReplacement of gear box for right side beltTechnicalTechnical
17/10/2022 9:3483ClincherHVAC -

on Chiller affected the line
 TechnicalTechnical
28/10/2022 7:2780Shared Wrapper  OperationalOrganizational
18/10/2022 21:3174Overcap_Reclosejamming at sorter Material DefectsTechnological
18/10/2022 20:2071SleeverFault 350- Wrong Cutting Position. Occurred after sleeve roll change over. Checked Keyence Sensor was responding  but had error on auto-run. Found the replaced sleeve roll had very light printed sensing mark.Isolated that sleeve roll then Performed Keyence Calibration procedure in reference with good sleeve markMaterial DefectsTechnological
24/10/2022 3:1068SeamerScratches and dents due to seamer timing TechnicalTechnical
25/10/2022 12:3565Checkweigher_2rolex wouldn't start on SCADA.Sina and cameron called to resolve the problemTechnicalTechnical
23/10/2022 12:3465Overcap_Reclosekando rubber belt worn needs changingCalled Engineer to fix.TechnicalTechnical
11/10/2022 9:4464Overcap_RecloseCylinder Snapped on the guideCalled Engineer to replace the CylinderTechnicalTechnical
26/10/2022 2:4063Case Packersize change over and Aggregation issues.Jesh and Don.OperationalOrganizational
11/10/2022 22:5561Checkweigher_1Initially tipdan screen was not connecting to T drive and missing PO from the list , after basic troubleshooting , changed the screen to a new one and the label was not printing. Swapped Tree line tipdan screen and label , replaced files with Mtn line dispensing to fix the issue TechnicalTechnical

@123CaM321 ,

Hi,

1  Add CATEGORY and DOWNTIME to table

Dinesh_Suranga_0-1667107889073.png

2  Right click on DOWNTIME and click on Maximum.

Dinesh_Suranga_2-1667107977742.png

3  Create a mesure using following DAX formula.

 

Machine Name = CALCULATE( Max('Table'[MACHINE] ) , 'Table'[DOWNTIME] =  MAX('Table'[DOWNTIME]))

4  Add new created mesure to table.

Dinesh_Suranga_3-1667108136619.png

 

Without seen the data model it is hard to give a best solution.

But I hope this will help you to solve your issue.

If you have any question regarding this solution please reply to this message.

Please acept this as solution if it helped you to solve the issue.

Thank you.

 

 

Ashish_Mathur
Super User
Super User

Hi,

Share some data that can be pasted in an MS Excel file and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.