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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
erhan_79
Post Prodigy
Post Prodigy

IF Formula Help

Dear All 

 

İ have  two table as below Table A and Table B  . İ would like create vlookup for Table B and see " Install Cost"  but on Table B i only want to see " 20A" group's cost on table B .How can i create the formula for this issue could you pls help 

 

thanks in advance

 

Capture-1.JPG

 

 

1 ACCEPTED SOLUTION

@erhan_79 

 

Please see if this is what you want.

Column = IF(TableB[Group]="20A",LOOKUPVALUE('TableA'[InstallCost],TableA[group A],TableB[Group]),0)

1.PNG





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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@erhan_79 there are many ways to do it, I can give you the answer but provide a proper solution I need to know:

 

- Is this group value unique between in both the tables?

- Is this group value unique in Table B table if not in the both?

- What is the logic that you only need install cost for Product A.

 

As I said , there are many ways to resolve it but once I have the answer of above questions, I can provide your effective solution.



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.

dear @parry2k  ;

 

i tried to explain your questions as below under your questions : 

 

-Is this group value unique between in both the tables?

Yes 

 

- Is this group value unique in Table B table if not in the both?

Yes it is unique too.

 

- What is the logic that you only need install cost for Product A.

 

İnfact i have a huge issue sure , just i needed to show a limited example ,you should imagine like that  let me explain pls; 

 

i have two tables ,and in these both table there are "Group" columns which has unique values.In "Table A " there is "Install Cost" column  also but in "Table  B" there is no "Install Cost" column.So i would like to create " Install Cost " column in "Table B" .But while creating i just want to see on these column's inside " 20A"  's (Group ) cost only.Other Group's (20B or 20C) value i dont want to see in table B new created "install cost" column

 

i hope it is clear 

 

 

@erhan_79 

 

Please see if this is what you want.

Column = IF(TableB[Group]="20A",LOOKUPVALUE('TableA'[InstallCost],TableA[group A],TableB[Group]),0)

1.PNG





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

Proud to be a Super User!




@erhan_79 I would recommend to set relationship between both the tables on group column and it will be 1-1 relatioship since group value is unique

 

and now you can simply add the column

 

New Install Code = 
IF ( TableB[Group] = "20A", RELATED ( TableA[Install Cost ), 0 )

 

Lookup can be very slow and that was the reason I asked those questions, I don't like to give the answers without knowing the full scenario. 

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos 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.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.