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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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