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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Hgoonetilleke
Regular Visitor

mapping data in multiple columns from another table

Hi All,

 

I am trying to map the equipment name from Table B to Table A

 

See short example below, however the data file im actually using will have 10000+ rows

 

Table A

Equipment IDEquipment Tag

1000

ABC-01
1001DEF-02
1002

ABC-03

1003JKL-04

 

TABLE B

Equipment Name

Equipment Parameter 1Equipment Parameter 2Equipment Parameter 3Equipment Parameter 4Equipment Parameter 5Equipment Parameter 6Equipment Parameter 7
A JKL-04??JKL-04???????
B   ABC-01   
C????  ?DEF-02 
D  ????????  
EABC-03    ??
F ?????????  

 

OUTPUT

Equipment IDEquipment TagEquipment Name

1000

ABC-01B
1001DEF-02C
1002

ABC-03

E
1003JKL-04A

 

The data in Table B is messy, I have used ? to represent random data. there could be duplicate tags, some cells are empty, others will have other numbers and letters

 

I tried using the 'lookupvalue' which worked well, but seems to only work with one column

I also tried merging the parameter columns and then doing a merge query with Table A equipment tag, but also was not very sucessful.

 

Any help would be great. thanks

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Hgoonetilleke 

 

You can try the following methods.
Tbale B: Transform-Unpivot Other Columns

vzhangti_0-1675653082500.png

Then

vzhangti_2-1675653197595.png

Result:

vzhangti_3-1675653216853.png

Column:

Equipment Name = 
CALCULATE ( MAX ( 'Table B'[Equipment Name] ),
    FILTER ( 'Table B', [Value] = EARLIER ( 'Table A'[Equipment Tag] ) )
)

vzhangti_4-1675653372367.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @Hgoonetilleke 

 

You can try the following methods.
Tbale B: Transform-Unpivot Other Columns

vzhangti_0-1675653082500.png

Then

vzhangti_2-1675653197595.png

Result:

vzhangti_3-1675653216853.png

Column:

Equipment Name = 
CALCULATE ( MAX ( 'Table B'[Equipment Name] ),
    FILTER ( 'Table B', [Value] = EARLIER ( 'Table A'[Equipment Tag] ) )
)

vzhangti_4-1675653372367.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you

lbendlin
Super User
Super User

Unpivot the data in table B

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.

Users online (4,367)