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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Saxon10
Post Prodigy
Post Prodigy

Calculated column contain multiple result

 

I have two tables are, Data and report, In data table contain item and supplier and report table contain item.

 

Both tables the item column is unique.

 

Data Table:

 

ITEM

SUPPLIER

112OP

A1

345YO

 

567

A2

345Y1

 

 

The supplier some time is blanks according to the item in data table. Example - 345YO AND 345Y1. 

 

Report Table:

 

ITEM

DESIRED RESULT FOR SUPPLIER

112OP

A1

345YO

 

567

A2

56890

NA

25645783

NA

XX12

NA

345Y1

 

 

If item matched in data table then return supplier (Example - 112OP, 567, 345YO, 345Y1) and if not then return “NA” according to the item (Example - 56890, 25645782, XX12, 345Y1).

 

I am trying to achieve what are the items is blanks and which item not available from data table into report table.

 

 

Can you please advise

 

2 ACCEPTED SOLUTIONS
parry2k
Super User
Super User

@Saxon10 add a new column in reporting table using the following expression, assuming these tables have a relation on Items  column

 

Supplier = 
VAR __supplier = CALCULATE ( MAX ( 'DataTable'[SUPPLIER] ),  RELATEDTABLE ( 'DataTable' ) )
RETURN
COALESCE ( __supplier, "NA" )

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

Anonymous
Not applicable

Hi @Saxon10 ,

Based on your description, you can create a column as follows.

Column = LOOKUPVALUE(Data[SUPPLIER],Data[ITEM],[ITEM],"NA")

Result:

v-yuaj-msft_0-1613528148159.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

5 REPLIES 5
Anonymous
Not applicable

Hi @Saxon10 ,

Based on your description, you can create a column as follows.

Column = LOOKUPVALUE(Data[SUPPLIER],Data[ITEM],[ITEM],"NA")

Result:

v-yuaj-msft_0-1613528148159.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

 

 

Thanks for your reply and simple way of your solution. 

parry2k
Super User
Super User

@Saxon10 add a new column in reporting table using the following expression, assuming these tables have a relation on Items  column

 

Supplier = 
VAR __supplier = CALCULATE ( MAX ( 'DataTable'[SUPPLIER] ),  RELATEDTABLE ( 'DataTable' ) )
RETURN
COALESCE ( __supplier, "NA" )

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi, 

 

Sorry for the late response. Your solution working well. Thanks for your time and help. 

Saxon10
Post Prodigy
Post Prodigy

I am looking for DAX (new calculated column option) in order to achieve my result.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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