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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Filter a column based on a value form another column

Hi,

 

I've got 2 tables:

1. Addresses (Column A and C)

2. Person(Column B and D)

picture.PNG

In the address table a person can have more addresses. The column is calld Type (red writen numbers)

In the person table there is a column named Person.PreferredAddresTypeId (yellow)

 

I've combined these two tables into one and now i want to filter the type column on the Person.PreferredAddresTypeId. as result i only have the preffed address of a person.

 

Any kind of help would be appreciated.

 

2 ACCEPTED SOLUTIONS
jthomson
Solution Sage
Solution Sage

So you want to have it just showing those rows where column C is the same as column D? If so, just make a calculated column something like:

 

IsPreferredAddress = [Type] = [Person.PreferredAddresTypeId]

 

then filter that on true?

View solution in original post

Anonymous
Not applicable

@Anonymous 

 

I took some liberties with test data I used for this, but I think my solution might help. 

 

I have the following tables imported in my model:

 

Person:

 

IdTypeName
12Chuck
21Adam

 

Address:

 

IdTypeAddress
11123 Schirra Court
12456 Grissom Drive
21213 Aldrin Circle
22548 Pogue Way

 

After importing them into PBI, I used the following table expression to create a new table that pulled in the preferred address for each person:

 
SUMMARIZE Table = 
SUMMARIZE(
    Person,
    Person[Id],
    Person[Type],
    Person[Name],
    "Preferred Address",
    CALCULATE(
        SELECTCOLUMNS('Address',"Address",'Address'[Address]),
        FILTER(
            'Address',
            'Address'[Type] = Person[Type]
        )
    )
)
DAX with created tableDAX with created table
 
Hope this helps!

 

Click HERE for the PBIX file.

CIick HERE for my address excel sheet.

Click HERE for my person excel sheet.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@Anonymous 

 

I took some liberties with test data I used for this, but I think my solution might help. 

 

I have the following tables imported in my model:

 

Person:

 

IdTypeName
12Chuck
21Adam

 

Address:

 

IdTypeAddress
11123 Schirra Court
12456 Grissom Drive
21213 Aldrin Circle
22548 Pogue Way

 

After importing them into PBI, I used the following table expression to create a new table that pulled in the preferred address for each person:

 
SUMMARIZE Table = 
SUMMARIZE(
    Person,
    Person[Id],
    Person[Type],
    Person[Name],
    "Preferred Address",
    CALCULATE(
        SELECTCOLUMNS('Address',"Address",'Address'[Address]),
        FILTER(
            'Address',
            'Address'[Type] = Person[Type]
        )
    )
)
DAX with created tableDAX with created table
 
Hope this helps!

 

Click HERE for the PBIX file.

CIick HERE for my address excel sheet.

Click HERE for my person excel sheet.

jthomson
Solution Sage
Solution Sage

So you want to have it just showing those rows where column C is the same as column D? If so, just make a calculated column something like:

 

IsPreferredAddress = [Type] = [Person.PreferredAddresTypeId]

 

then filter that on true?

Anonymous
Not applicable

Thank you! I Will look at it after my vacation and leave a comment.

Hi @Anonymous ,

 

If above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!

Best regards,
Dina Ye

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

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!

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.