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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
InsightSeeker
Helper III
Helper III

Need help with measure

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 CodeSupplier
123Fruit
126Vegetables
129Spare Parts
132Tyres

 

 

Table 2  
Inv NoSupplierResult (Supplier Code)
233131Fruit123
256363Vegetables126
279595Spare Parts129
302827Tyres132
326059Fruit123
349291Vegetables126
372523Spare Parts129
395755Tyres132
418987Fruit123
442219Vegetables126
465451Spare Parts129
488683Tyres132
   

 

Thanks

1 ACCEPTED SOLUTION

Hi @rajendraongole1  - I want to acheive this thorugh measure instead of calculated column, is it possible?

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
rajendraongole1
Super User
Super User

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:

 

Result1 (Supplier Code) =
LOOKUPVALUE(
    'SP1'[Supplier Code],
    'SP1'[Supplier], 'Sp2'[Supplier]
)

 

rajendraongole1_1-1717928588049.png

 

 

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





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

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!!





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

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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