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.
Hello,
I have a dataset where I would like to Group based on Project ID, all the distinct values for Business Activity type.
First, I grouped Rows, and selected "All Rows" Operation. Called Column name "MyTable".
Then I added a custom column:
= Table.AddColumn(#"Grouped Rows", "Custom", each Table.Column([MyTable], "Business Activity"))
Then I selected Extract Values From List, using comma as delimter:
And here I got sometimes the same Business Acitivity 10 times for the same Project, since we had 10 rows with it.
Can I somehow make it distinct?
end of code:
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.Column([MyTable], "Business Activity")),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"MyTable"}),
#"Extracted Values" = Table.TransformColumns(#"Removed Columns", {"Custom", each Text.Combine(List.Transform(_, Text.From), ","), type text})
in
#"Extracted Values"
Try replacing "_" with "List.Distinct(_)" or even "List.Sort(List.Distinct(_))".
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |