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
HBL_Nick
Frequent Visitor

For each code, Lookup values and summ all values

Hi All,

 

I'm not sure how to explain my question, so I'll try using an example, I got a dataset like this, a project with multiple cost codes:

Description (text)Relevant Codes (text)
Project oneP01, P03, P05
Project twoP02, P04, P06

 

The codes with the cost on them: 

 

Projectcode (text) Cost (number
P01100
P0220
P0340
P0410
P055
P0630

 

Now I want to make a table with a calculation of how much each project has in cost in total:

 

project description (text)Cost (number)
Project one145
Project two60

 

Can any one help? Thank you in advance.

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@HBL_Nick ,

follow the below steps,

1. In power query editor split the relevant code text column by delimiter,

Arul_0-1677508917899.png

instead of columns you have select rows (refer the image attached)

Arul_1-1677508967188.png

2. Then close and apply and create the relationship between Table 1 and Table 2  like the below,

Arul_2-1677509049327.png

3. Pull the required columns to the visuals,

Arul_0-1677509165499.png

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


View solution in original post

1 REPLY 1
Arul
Super User
Super User

@HBL_Nick ,

follow the below steps,

1. In power query editor split the relevant code text column by delimiter,

Arul_0-1677508917899.png

instead of columns you have select rows (refer the image attached)

Arul_1-1677508967188.png

2. Then close and apply and create the relationship between Table 1 and Table 2  like the below,

Arul_2-1677509049327.png

3. Pull the required columns to the visuals,

Arul_0-1677509165499.png

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.