Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello, I have 3 columns that all indictae certain positions against a task, each position may assume 1 or all roles for that task, some roles also being 'unassigned' (Content Author, Content Manager, Approver). I have already aggregated these into a single column
Solved! Go to Solution.
Hi @AMBP1973.
Lets my suggestions for goal 1:
First Step: Create a calculated table that unpivots the 3 columns into a single column of positions
PositionsExpanded =
UNION(
SELECTCOLUMNS(Task, "Position", Task[Content Author]),
SELECTCOLUMNS(Task, "Position", Task[Content Manager]),
SELECTCOLUMNS(Task, "Position", Task[Aprover])
)Then, create a calculated column to classify each row:
RoleStatus =
IF(
PositionsExpanded[Position] = "unassigned",
"Unassigned",
"Assigned"
)
Now, create a measure to count and calculate percentages:
COUNTROWS(PositionsExpanded)include RoleStatus in Legend:
Hi @AMBP1973 ,
with pleasure.
Assuming that this is the structure of your origin or source table:
and assuming that you have this table already loaded into Power Query,
you have to perform the following steps to transform the table to the format I suggested:
You can add these steps without any coding using the UI or copy the following Power Query (M) Code:
let
Source = OriginTable,
#"Unpivoted Only Selected Columns" = Table.Unpivot(Source, {"Content Author", "Content Manager", "Approver"}, "Attribute", "Value"),
#"Renamed Columns" = Table.RenameColumns(#"Unpivoted Only Selected Columns",{{"Attribute", "Role"}, {"Value", "Assigned"}}),
#"Added Index" = Table.AddIndexColumn(#"Renamed Columns", "Index", 1, 1, Int64.Type),
#"Reordered Columns" = Table.ReorderColumns(#"Added Index",{"Index", "Task", "Role", "Assigned"})
in
#"Reordered Columns"
Hope that helps and works for you.
Hi @AMBP1973.
Lets my suggestions for goal 1:
First Step: Create a calculated table that unpivots the 3 columns into a single column of positions
PositionsExpanded =
UNION(
SELECTCOLUMNS(Task, "Position", Task[Content Author]),
SELECTCOLUMNS(Task, "Position", Task[Content Manager]),
SELECTCOLUMNS(Task, "Position", Task[Aprover])
)Then, create a calculated column to classify each row:
RoleStatus =
IF(
PositionsExpanded[Position] = "unassigned",
"Unassigned",
"Assigned"
)
Now, create a measure to count and calculate percentages:
COUNTROWS(PositionsExpanded)include RoleStatus in Legend:
Hi @AMBP1973 ,
independently of what you wanna do with the data I would recommend to change the structure of your table to something like this:
| Assignement ID | Task | Role | Assigned |
| 1 | Task 1 | Content Author | Unassigned |
| 2 | Task 1 | Content Manager | Unassigned |
| 3 | Task 1 | Approver | Unassigned |
| 4 | Task 2 | Content Author | Unassigned |
| 5 | Task 2 | Content Manager | Unassigned |
| 6 | Task 2 | Approver | Unassigned |
| 7 | Task 3 | Content Author | Technical Logistics Officer |
| 8 | Task 3 | Content Manager | Technical Logistics Officer |
| 9 | Task 3 | Approver | Deputy Director Supportability Analysis |
| 10 | Task 4 | Content Author | Technical Logistics Officer |
| 11 | Task 4 | Content Manager | Technical Logistics Officer |
| 12 | Task 4 | Approver | Deputy Director Supportability Analysis |
You should do that restructuring with Power Query.
Based on this structure calculations and slicing should be much easier.
Does that help you? Do you need any further assistance?
Hello @DNMAF , I am unsure how to go about changing the structure of the table, could you please assist?
Could you please provide additional guidance on restructuring to acheive the below. Many thanks
| Assignement ID | Task | Role | Assigned |
| 1 | Task 1 | Content Author | Unassigned |
| 2 | Task 1 | Content Manager | Unassigned |
| 3 | Task 1 | Approver | Unassigned |
| 4 | Task 2 | Content Author | Unassigned |
| 5 | Task 2 | Content Manager | Unassigned |
| 6 | Task 2 | Approver | Unassigned |
| 7 | Task 3 | Content Author | Technical Logistics Officer |
| 8 | Task 3 | Content Manager | Technical Logistics Officer |
| 9 | Task 3 | Approver | Deputy Director Supportability Analysis |
| 10 | Task 4 | Content Author | Technical Logistics Officer |
| 11 | Task 4 | Content Manager | Technical Logistics Officer |
| 12 | Task 4 | Approver | Deputy Director Supportability Analysis |
Hi @AMBP1973 ,
with pleasure.
Assuming that this is the structure of your origin or source table:
and assuming that you have this table already loaded into Power Query,
you have to perform the following steps to transform the table to the format I suggested:
You can add these steps without any coding using the UI or copy the following Power Query (M) Code:
let
Source = OriginTable,
#"Unpivoted Only Selected Columns" = Table.Unpivot(Source, {"Content Author", "Content Manager", "Approver"}, "Attribute", "Value"),
#"Renamed Columns" = Table.RenameColumns(#"Unpivoted Only Selected Columns",{{"Attribute", "Role"}, {"Value", "Assigned"}}),
#"Added Index" = Table.AddIndexColumn(#"Renamed Columns", "Index", 1, 1, Int64.Type),
#"Reordered Columns" = Table.ReorderColumns(#"Added Index",{"Index", "Task", "Role", "Assigned"})
in
#"Reordered Columns"
Hope that helps and works for you.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |