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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
tbhatia
Microsoft Employee
Microsoft Employee

Unique ID's from Data Set

We are preparing a dashboard on RPA data. We have 2 columns. First has unique work ID's. The other column has names, BOT and Humans. These ID'S in the data set have been worked by both humans and BOT's and there are ID's which have been worked only by Humans. We want to get only those ID's where both human and BOT's have worked so that we can reach an AHT figure and bifurcate how mauch contribution is made by both BOT and Humans in the same work ID. 

3 REPLIES 3
Anonymous
Not applicable

Hi @tbhatia ,

 

You can try to deduplicate the names by grouping by ID, and keep the ones greater than 2.

The complete M language is as follows

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwMFTSUXLyD1GK1YFzPUpzE/OKYSJGGCLGMC2xAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"ID's" = _t, names = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID's", Int64.Type}, {"names", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"ID's"}, {{"Count", each _, type table [#"ID's"=nullable number, names=nullable text]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.RowCount(Table.Distinct([Count]))),
    #"Expanded Count" = Table.ExpandTableColumn(#"Added Custom", "Count", {"names"}, {"names"})
in
    #"Expanded Count"

 

Initial data

vstephenmsft_1-1644475827578.png

1.Group by and select all rows.

vstephenmsft_2-1644475855848.png

vstephenmsft_3-1644475863626.png

 

2.Add a custom column.

vstephenmsft_4-1644475891260.png

 

3.Expand the column and filter out rows with custom column value equal to 2.

vstephenmsft_5-1644475951518.pngvstephenmsft_6-1644475958561.pngvstephenmsft_7-1644475962688.png

 

 

Best Regards,

Stephen Tao

 

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

 

AnkitKukreja
Super User
Super User

Hi! @tbhatia 

 

Please share your pbix or a sample data.

 

For Power BI trainings or support dm or reach out to me on LinkedIn.
If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.

Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904
https://topmate.io/ankit_kukreja/
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors