Forum Discussion
Help with a table visualization
- 10 years ago
List.Distinct will do that:
let Source = Ressource, GroupRows = Table.Group(Source, {"ProjectName"}, {{"ResourceName", each _, type table}, {"SumTimesheetActualWork", each List.Sum([#"TimesheetActualWork"]), type number}}), TransformColumnToText = Table.AddColumn(GroupRows, "Custom", each Text.Combine(List.Distinct([ResourceName][ResourceName]), ", ")), Cleanup = Table.RemoveColumns(TransformColumnToText,{"ResourceName"}) in Cleanup
Try a custom column in Project like:
Resources = CONCATENATEX(VALUES(Resource[ResourceName]),[ResourceName],",")
I assume that Project and Resouce are related on ProjectName.
- Sean10 years ago
Community Champion
Greg_Deckler Thanks your response although not my question gave me an idea for my files
However is there a way to exclude a certain value from being included in the concatenation?
If instead of a name it says "Deleted" could you exclude "Deleted" from being concatenated?
EDIT: Also is there a way to alphabetize the result?
- Greg_Deckler10 years ago
Community Champion
Well, you can filter out certain values but not aware of a way to alphabetize. You might want to look at doing this in M code as part of your query, a lot more options for processing lists and such:
Resources1 = CONCATENATEX(FILTER(VALUES(Timesheet[ResourceName]),[ResourceName]<>"John"),[ResourceName],",")
- Sean10 years ago
Community Champion
Greg_Deckler Thanks!
One issue I didn't foresee and I wonder if mork encounters it too...
When you create a Table - in the bottom TOTAL row - under the Resources column we just created
it ends up concatenating ALL [ResourceName]s - basically all names for all projects.
In the rows above the TOTAL row with the details for each project everything shows up correctly - only the right names.
Very strange because it is data type TEXT and in the bottom TOTAL row of the table it shows ALL names concatenated
Which technically is not wrong - because that's the totals for all projects - so it lists all resources
but I've never seen anything in the TOTAL row of data type TEXT
And my table contains measures that I want to see the Totals for - so I can't just turn off the totals for the whole table???