Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SDM_1997
Helper II
Helper II

Extract Task Summary Name from Task Name column using TaskWBS

Hi All,
Have a requirement to extract the "Tasks Summary Names" from a column called Task Name based on the TaskWBS column's value.
Our data is extracted from MS Project Online, using the api call in this format => https://<tenantname>.sharepoint.com/sites/pwa/_api/Projectdata/Tasks

Now, all Tasks that have subtasks are called as Task Summary Names. That is understood by the WBS value.
So, if WBS value is "blank", then that is the top most task, "Task 1", under which all tasks are present. If the value of a task, "Task 2", is "1", then the task summary of "Task 2" is "Task 1". Similarly, if there is a subtask under "Task 2" as "T 3" with the WBS value of 1.1, then summary name of "T 3" is "Task 2" and so on.
Something like this: - 

SDM_1997_0-1683461293356.png


Now, in Power BI, extracting the Tasks table means that it is extracting all TaskNames as simple tasks and only way to differentiate is to use the TaskWBS table.
We have data in the below format: - 

ProjectName                         TaskName                           TaskWBS   Text Before Delimiter
AS01 AS01   
AS01 memo PHF writing data TTT mtg3 
AS01 memo PHF review4 
AS01 T18m DLPG data treatment2.22
AS01 global project management (TDT, mtg,..)1 
AS01 T9m  2.42
AS01 T12m  2.52
AS01 T18m  2.62
AS01 T24m  2.72
AS01 T24m DLPG2.32
AS01 T20m 2.82
AS01 T24m 2.92
AS01 T24m DOPG2.12
AS01 Stability plan 2-8°C2 
AS01 T18m DLPG lab2.12
HRD - i88HRD - i88  
HRD - i88Project Management1 
HRD - i88Project Milestones1.11
HRD - i88Start of Project1.1.11.1
HRD - i88Implementation of Project1.1.21.1
HRD - i88work shop prod1.1.31.1
HRD - i88Phase 0 document1.1.41.1
HRD - i88Revue document1.1.51.1
HRD - i88Effectivi1.1.71.1
HRD - i88Formation1.1.61.1

 
Now, we have Project Name, Task Name and TaskWBS from the source. As seen, the Task WBS value repeats itself as the Project changes since it only denotes task level.

The Text Before Delimiter is a custom column, I created to extract the WBS values that we need to get the Summary Names of its corresponding Task.  Formula - Table.AddColumn(#"Filtered Rows", "Text Before Delimiter", each Text.BeforeDelimiter([TaskWBS], ".", {0, RelativePosition.FromEnd}), type text)

Now, currently using a column called "TaskIsSummary", I am able to filter out all Task Names that are summaries. In a separate table. Like this: - 

SDM_1997_2-1683560848887.png

 

So, currently I want to use this filtered table to get my data in the following format: - 

SDM_1997_3-1683561025453.png

The Task Summary Name is the expected column output.
As in the above pic, the Task Names are repeating now besides the subtasks to denote its parent task.
I am able to achieve this using PQ, by merging the new table with the existing table (Linking Project IDs of both and TaskWBS from new table with Text before Delimiter column in the original table, so basically 4 columns linked together). But I am aware that merging has performance costs while refreshing.
Hence, if this output is possible as a DAX measure, would be better for performance I guess.
Please Help
Thanks!

1 ACCEPTED SOLUTION
SDM_1997
Helper II
Helper II

Update - I was not able to find any solution as a DAX measure.
Therefore, I stuck with my Power Query solution only.
But instead of doing this merging of Linking Project IDs of both tables and TaskWBS from new table with Text before Delimiter column in the original table in the Dataset itself, I moved this transformation to a Dataflow.
This improved the performance significantly. In the Dataflow, this merging takes hardly 10 seconds.

View solution in original post

1 REPLY 1
SDM_1997
Helper II
Helper II

Update - I was not able to find any solution as a DAX measure.
Therefore, I stuck with my Power Query solution only.
But instead of doing this merging of Linking Project IDs of both tables and TaskWBS from new table with Text before Delimiter column in the original table in the Dataset itself, I moved this transformation to a Dataflow.
This improved the performance significantly. In the Dataflow, this merging takes hardly 10 seconds.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors