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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
utsavlexmark
Helper III
Helper III

Need Help in Data Customization

Hello,

As always whenever I have some special issues in Power Bi - I came here.

Let me tell you the scenario:

I have a table in Power Bi as below - 

Product Name                   Product Category                     Price                       Few other columns

 

I have created this table from a dataset as "Products". I have a filter for this table and that is "Product Part Number".  There are "N" number of products and each products has a separate part number. Now there is a requirement, the products needs to be categorised. The category is based on whether those products promoted or not. 

 

I have a dataset of partnumbers of products those are promoted and the name of the dataset is "Promotion". Now I want to create a custom column in "Products" dataset that will compare the partnumbers from the table with the partnumber column of "Promotion" table and if it matches will return "Yes" or "No".

 

I think "vlookup" might do it, but couldn't find a good explanation on how to implement that.

Regards

Utsav

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi  @utsavlexmark ,

 

Yes,"lookupvalue" function would help:

Assumed that your 2 tables as as below:

v-kelly-msft_1-1623653441490.pngv-kelly-msft_2-1623653449626.png

 

Create a calculated columns similarly as below:

Is promoted = 
var _lookup=LOOKUPVALUE('Product Part Number'[Product],'Promotion'[part number],'Product Part Number'[part number],blank())
Return
IF(_lookup<>BLANK(),"Yes","No")

And you will see:

v-kelly-msft_0-1623653354264.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi  @utsavlexmark ,

 

Yes,"lookupvalue" function would help:

Assumed that your 2 tables as as below:

v-kelly-msft_1-1623653441490.pngv-kelly-msft_2-1623653449626.png

 

Create a calculated columns similarly as below:

Is promoted = 
var _lookup=LOOKUPVALUE('Product Part Number'[Product],'Promotion'[part number],'Product Part Number'[part number],blank())
Return
IF(_lookup<>BLANK(),"Yes","No")

And you will see:

v-kelly-msft_0-1623653354264.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

amitchandak
Super User
Super User

@utsavlexmark , Create a new column like

 

Var _cnt = countx(filter(Promotion, Promotion[part number] = partnumbers[partnumbers]),Promotion[partnumbers])+0
return
if(_cnt >0, "Yes", ""No)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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