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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Vivek2456
Frequent Visitor

Multiple overlapping dates and grouping data based on a flow - Urgent

Hello,

Need urgent help. I am working on the below data with requirements below. @heaher_iTalent @Pragati @Greg_Deckler

 

Requierement1 - Need to group the cases were the flow of state is from non zero to zero as per ascending order of state time with an ID column. Groups are coloured in different colours. Output shown in Requierement2.

Vivek2456_2-1669437878163.png

Requirement2 - Identify the groups were state type 1 is included. There can be state type zeros also in this group. Output in Requirement3

Vivek2456_3-1669437937509.png

Requirement3 - Identify the groups were state is 2 against the first state type 1 in each group.Output in Requirement 4

Vivek2456_4-1669438011693.png

Requirement4 - For each id get the min of the state_time at the first state type 1 and max of the state time. Output in output5

Vivek2456_5-1669438152178.png

output5

Vivek2456_9-1669438845078.png

 

Similar to output5 we will have to repeat the same steps for multiple object ids. Suppose below is the final output I get for each objectid. From here I need to understand which all IDs from each object id overlaps mutually. For example IDs b, y and m will overlap here mutually and I need to find the overlap duration here which is 2:35 - 2:45. In an object ID no IDs will overlap.

Note one ID from object ID can overlap with multiple IDs in Obj ID 2 or 3 and that is making my life difficult. Also more object IDs can get added to this list and I need to find a logic that works without hardcoding them. Please help.

 

Vivek2456_10-1669439245632.pngVivek2456_11-1669439253660.png

1 ACCEPTED SOLUTION
mangaus1111
Solution Sage
Solution Sage

Hi @Vivek2456 ,

check if my solution is ok for you.

https://1drv.ms/u/s!Aj45jbu0mDVJi21V7mLokpYI0B9m?e=bZisFN

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

5 REPLIES 5
mangaus1111
Solution Sage
Solution Sage

Hi @Vivek2456 ,

check if my solution is ok for you.

https://1drv.ms/u/s!Aj45jbu0mDVJi21V7mLokpYI0B9m?e=bZisFN

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

Vivek2456
Frequent Visitor

Thank you. Apologies but the dara is confidential to share. If possible could you look at the last requirement alone and help me with the solution. So the data I get in power query will be like the table below and I am looking to identify the cases that overlap mutually.

Vivek2456_0-1669641309561.png

 

Hi @Vivek2456 ,

please send sample data (not confidential) in text or excel form for at least 3 object_id. Thanks

mangaus1111_0-1669647887075.png

 

mangaus1111
Solution Sage
Solution Sage

Hi @Vivek2456 ,

see my pbi file. If that´s ok, please send us your database with at least 3 object_id, then I can go one step further trying to find a solution for the last requirement.

 

https://1drv.ms/u/s!Aj45jbu0mDVJi2p-XUMnpiux-6KB?e=H8AidH

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 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.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors