Forum Discussion
Combine Columns
- 3 years ago
Then I'd flatten the initial table with the code below, rename manually "Lead Name" into just "Name" (it can be also done in [DAX] via SELECTCOLUMNS) and use this flattened table in visuals.
In plain text:
Table = UNION ( SUMMARIZE ( Data, [Work Status], [Segment], [Lead Name], "Role", "Lead", "Allocation", SUM ( Data[Lead Allocation] ) ), FILTER ( SUMMARIZE ( Data, [Work Status], [Segment], [Support Name], "Role", "Support", "Allocation", SUM ( Data[Support Allocation] ) ), NOT ISBLANK ( [Support Name] ) ) )Best Regards,
Alexander
Thanks very much barritown. This solution works well. I was wondering if it would also work if I needed to have two additional fields added to it, SEGMENTATION and WORK STATUS. Both are text fields. I have added them to an example below.
Could the code above be adjusted to add this in to the summary table?
Could you please clarify how you see the final result with these additional columns? Do you plan any additional slicing by Work Status or Segment?
- surfboarder19983 years agoNew Member
I plan to slice by Work Status and use the Segment in the legend. Right now, the way that you have shown them would be great. I would be able to total the two allocation columns and and that total would still be for a specific Segment and have a specific Work Status.
I hope this makes sense. Let me know if there's more clarification I can provide and thank you very much for your help.
- barritown3 years agoSolution Sage
Then I'd flatten the initial table with the code below, rename manually "Lead Name" into just "Name" (it can be also done in [DAX] via SELECTCOLUMNS) and use this flattened table in visuals.
In plain text:
Table = UNION ( SUMMARIZE ( Data, [Work Status], [Segment], [Lead Name], "Role", "Lead", "Allocation", SUM ( Data[Lead Allocation] ) ), FILTER ( SUMMARIZE ( Data, [Work Status], [Segment], [Support Name], "Role", "Support", "Allocation", SUM ( Data[Support Allocation] ) ), NOT ISBLANK ( [Support Name] ) ) )Best Regards,
Alexander
- surfboarder19983 years agoNew Member
This is exactly the solution I was looking for. Thank you so much for your help barritown.