March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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êsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |