Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello - I need help to create a measure as described below:
If the 'Table 1 Supplier' is equal to the 'Table 1 Supplier', return the supplier code from 'Table 1'.
| Table 1 | |
| Supplier Code | Supplier |
| 123 | Fruit |
| 126 | Vegetables |
| 129 | Spare Parts |
| 132 | Tyres |
| Table 2 | ||
| Inv No | Supplier | Result (Supplier Code) |
| 233131 | Fruit | 123 |
| 256363 | Vegetables | 126 |
| 279595 | Spare Parts | 129 |
| 302827 | Tyres | 132 |
| 326059 | Fruit | 123 |
| 349291 | Vegetables | 126 |
| 372523 | Spare Parts | 129 |
| 395755 | Tyres | 132 |
| 418987 | Fruit | 123 |
| 442219 | Vegetables | 126 |
| 465451 | Spare Parts | 129 |
| 488683 | Tyres | 132 |
Thanks
Solved! Go to Solution.
Hi @rajendraongole1 - I want to acheive this thorugh measure instead of calculated column, is it possible?
Hi,
Create a relationship (Many to One and Single) from Table 2 to Table1. To your visual, drag Supplier from Table 1. Write this measure
SC = max('Table1'[Supplier code])
Hope this helps.
Hi @InsightSeeker -Create a new column in table 2 uses LOOKUPVALUE to search 'Table 1' for the matching 'Supplier' and returns the corresponding 'Supplier Code'.
calculated column:
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @rajendraongole1 - I want to acheive this thorugh measure instead of calculated column, is it possible?
Hi @InsightSeeker - Creating a measure to replicate the functionality of LOOKUPVALUE can be challenging because measures in Power BI are context-sensitive calculations meant to aggregate data rather than perform row-by-row operations.
you have to mark mine reply as a solution.
Can you do it?
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |