The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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.
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
1.Group by and select all rows.
2.Add a custom column.
3.Expand the column and filter out rows with custom column value equal to 2.
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.
Hi! @tbhatia
Please share your pbix or a sample data.
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.