Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi there!
I got a parser from Primavera P6.
From PROJWBS table I have wbs_id (unique value), parent_wbs_id (tells me the hierarchy), and wbs_short_name (gives me a code name).
The hierarchy has 9 levels.
To define the hierarchy, I have created a Path column using:
Path = PATH (PROJWBS[wbs_id],PROJWBS[parent_wbs_id])
Now, I need to create the WBS Full Code, using:
1. Hierarchy
2. wbs_short_name
For example:
Perhaps it's an open question, but I don't know how to start.
In this link you can find the .pbix file
Thanks a lot for your help.
Solved! Go to Solution.
Hi @jcarlos ,
Try the following code:
short name =
LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 1 )) &
IF( NOT( ISBLANK(PROJWBS[Level_2])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 2 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_3])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 3 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_4])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 4 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_5])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 5 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_6])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 6 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_7])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 7 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_8])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 8 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_9])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 9 )))
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @jcarlos ,
Try the following code:
short name =
LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 1 )) &
IF( NOT( ISBLANK(PROJWBS[Level_2])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 2 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_3])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 3 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_4])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 4 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_5])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 5 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_6])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 6 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_7])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 7 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_8])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 8 ))) &
IF( NOT( ISBLANK(PROJWBS[Level_9])),"." &LOOKUPVALUE(PROJWBS[wbs_short_name],[wbs_id],PATHITEM ( PROJWBS[Path], 9 )))
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @jcarlos
Thank you for your words, however sorry but you should select my answer and not yours 😄 so it can help others
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThis is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
56 | |
56 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
39 |