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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Filter 2 related tables

Hello all,

 

I have the follow table:

IDInvoiceCenter ACenter BValue AValue BWeight AWeight BDate ADate B

1

50833840000,001500,004500,00570,0021/01/202029/01/2020
150838040000,001500,004500,00570,0021/01/202029/01/2020
150838340000,0040000,004500,004500,0021/01/202021/01/2020
150833540000,00700,004500,0020,0021/01/202008/05/2020

 

I just need to see the line 3 of the table.

I wanna filter only the cases where Center A = Center B AND Date A = Date B (line 3 in the table).

It seems to be easy to resolve but i'm having this poblem because i have 2 differents tables:

Table A: Center A, Value A, Weight A and Date A

Table B: Center B, Value B, Weight B and Date B

 

So i can't create a measure with a siple Filter.

 

I don't know if i was clear enought but anyone can help me?

 

I took a look on the community but i didn't find anything that could help me 😞

 

 

 

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

Hi @Anonymous ,

 

We can use the merge function to meet your requirement.

Merge Table A and Table B in Power Query Editor based on Right outer.

 

Filter1.jpg

 

Filter2.jpg

 

Or if you want to show the output in a table visual like this,

 

Filter3.jpg

 

You can create this measure and put it in Filter on this visual, configure the value is 1.

 

Measure = 
IF(
    MAX('Table A'[Invoice])=MAX('Table B'[Invoice]) &&
    MAX('Table A'[Date A])=MAX('Table B'[Date B]) &&
    MAX('Table A'[Center A])=MAX('Table B'[Center B]) &&
    MAX('Table A'[Value A])=MAX('Table B'[Value B]) && 
    MAX('Table A'[Weight A])=MAX('Table B'[Weight B]),1,0)

 

Filter4.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

View solution in original post

3 REPLIES 3
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can use the merge function to meet your requirement.

Merge Table A and Table B in Power Query Editor based on Right outer.

 

Filter1.jpg

 

Filter2.jpg

 

Or if you want to show the output in a table visual like this,

 

Filter3.jpg

 

You can create this measure and put it in Filter on this visual, configure the value is 1.

 

Measure = 
IF(
    MAX('Table A'[Invoice])=MAX('Table B'[Invoice]) &&
    MAX('Table A'[Date A])=MAX('Table B'[Date B]) &&
    MAX('Table A'[Center A])=MAX('Table B'[Center B]) &&
    MAX('Table A'[Value A])=MAX('Table B'[Value B]) && 
    MAX('Table A'[Weight A])=MAX('Table B'[Weight B]),1,0)

 

Filter4.jpg

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?

 

Best regards,

 

Community Support Team _ zhenbw

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

 

BTW, pbix as attached.

amitchandak
Super User
Super User

@Anonymous , can you share both tables (sample data) and expected output with sample filter

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

@amitchandak 

 

I have 2 tables:

Table A:

IDInvoiceCenter AValue AWeight ADate A
1508340000,004500,0021/01/2020

 

Table B:

InvoiceCenter BValue BWeight BDate B
50381500,00570,0029/01/2020
50801500,00570,0029/01/2020
508340000,004500,0021/01/2020
5035700,0020,0008/05/2020

 

So I joined the two tables and got the table below:

IDInvoice Center ACenter BValue AValue BWeight AWeight BDate ADate B
150833840000,001500,004500,00570,0021/01/202029/01/2020
150838040000,001500,004500,00570,0021/01/202029/01/2020
150838340000,0040000,004500,004500,0021/01/202021/01/2020
150833540000,00700,004500,0020,0021/01/202008/05/2020

 

Now i need the follow output, where Center A = Center B and Date A = Date B:

IDInvoice Center ACenter BValue AValue BWeight AWeight BDate ADate B
150838340000,0040000,004500,004500,0021/01/202021/01/2020

 

 

Any question, please, let me know

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.