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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Vlookup between two tables to exclude Values

Hello everyone.

 

I have got the following situation:

I have the main table named "OD". In this table is a column named "DocNr,Years,Bkrs" and a column named "NettingAmount"(imaginary values in this case because of confidentiality).

 

hbroich_1-1643301866766.pnghbroich_2-1643301940717.png

 

 

I have a second table named "Definitionen". In this table is a column named "Formel".

hbroich_0-1643301503094.png

Now i want to implement a so called vlookup which says: If the Value from the column "DocNr,Years,Bkrs" is also part of the column "Formel", than dont take the Netting Amount of it.


So that I only have the Netting Amounts which are not part of the column "Formel" from the table "Definitionen".

Does anyone have a solution for this?

Thank you very much in advance!

BR

 

 

 

 

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

Hi @Anonymous ,

 

I create the following sample data.

 

vkkfmsft_0-1643778738246.png   vkkfmsft_1-1643778749511.png

 

Then create a new column:

 

Column = IF ( NOT [DocNr,Years,Bkrs] in VALUES ( Definitionen[Formel] ), [NettingAmount] )

vkkfmsft_3-1643779271079.png

 

Or create the measure:

 

Measure = 
CALCULATE (
    SUM ( OD[NettingAmount] ), 
    EXCEPT ( VALUES ( OD[DocNr,Years,Bkrs] ), VALUES ( Definitionen[Formel] ) )
)

vkkfmsft_4-1643779376760.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

I create the following sample data.

 

vkkfmsft_0-1643778738246.png   vkkfmsft_1-1643778749511.png

 

Then create a new column:

 

Column = IF ( NOT [DocNr,Years,Bkrs] in VALUES ( Definitionen[Formel] ), [NettingAmount] )

vkkfmsft_3-1643779271079.png

 

Or create the measure:

 

Measure = 
CALCULATE (
    SUM ( OD[NettingAmount] ), 
    EXCEPT ( VALUES ( OD[DocNr,Years,Bkrs] ), VALUES ( Definitionen[Formel] ) )
)

vkkfmsft_4-1643779376760.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Thank you very much @v-kkf-msft!

It works!

BR

amitchandak
Super User
Super User

@Anonymous , you have lookupvalue, that you can try

 

 

refer if needed

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors