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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
denn9
New Member

Help matching cells in a table based on the WBS ID

I am attempting to bridge two tables that use different reference codes for projects. One uses a numbered ID and the other uses a WBS ID. I need to create a one to one relationship, but one of the tables is broken down at a smaller level. What I mean by this is that the IDs from one table need to match an ID from the other table like this:

denn9_0-1747218253317.png

 

The problem is that the table with the WBS codes has them broken down even further, so that for every numbered ID, there are several WBS IDs. Like this,

denn9_1-1747218338998.png

 

There are thousands of rows, so it is not feasible to match each manually. Is there a way to make it so that every WBS ID that starts with "WBS.10.09" is matched to the Project ID 41?

 

Thank you for your help!

 

 

2 ACCEPTED SOLUTIONS
techies
Super User
Super User

Hi @denn9 pls try adding calculated columns in the detailed WBS table

 

WBS_Prefix =
VAR Parts = SUBSTITUTE([WBS_Code], ".", "|")
VAR FirstSep = FIND("|", Parts)
VAR SecondSep = FIND("|", Parts, FirstSep + 1)
VAR ThirdSep = FIND("|", Parts, SecondSep + 1)
VAR Prefix = LEFT(Parts, ThirdSep - 1)
RETURN SUBSTITUTE(Prefix, "|", ".")
 
ProjectID =
LOOKUPVALUE(
    ProjectMap[ProjectID],
    ProjectMap[WBS_Prefix],
    DetailedWBS[WBS_Prefix]
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

View solution in original post

techies
Super User
Super User

Hi @denn9 or add a custom column in the power query editor in the detailed WBS table

 

Text.BeforeDelimiter([WBS_Code], ".", 2)

 

then merge queries

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @denn9,

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

Anonymous
Not applicable

Hi @denn9,

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

Anonymous
Not applicable

Hi @denn9,

we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Vinay Pabbu

collinq
Super User
Super User

Hi @denn9 ,

@techies Suggestion will probably work and may be the more elegant solution.  I was thinking the easiest way would be to make a column based on the WBS Id where you strip off the last 3 charaacters.  And then, match that to the ID's




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




techies
Super User
Super User

Hi @denn9 or add a custom column in the power query editor in the detailed WBS table

 

Text.BeforeDelimiter([WBS_Code], ".", 2)

 

then merge queries

― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978
techies
Super User
Super User

Hi @denn9 pls try adding calculated columns in the detailed WBS table

 

WBS_Prefix =
VAR Parts = SUBSTITUTE([WBS_Code], ".", "|")
VAR FirstSep = FIND("|", Parts)
VAR SecondSep = FIND("|", Parts, FirstSep + 1)
VAR ThirdSep = FIND("|", Parts, SecondSep + 1)
VAR Prefix = LEFT(Parts, ThirdSep - 1)
RETURN SUBSTITUTE(Prefix, "|", ".")
 
ProjectID =
LOOKUPVALUE(
    ProjectMap[ProjectID],
    ProjectMap[WBS_Prefix],
    DetailedWBS[WBS_Prefix]
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors