Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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(_))".
User | Count |
---|---|
77 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
93 | |
50 | |
49 | |
46 |