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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
tgo
Frequent Visitor

If condition in two tables

Hi everybody,

 

I'm tryin to filter the whole chain of my datas in my network navigation visual. My data look like: 

 

ID from     ID to

Project 1    Product1

Project 1    Product 2

Product 1   Market 1

Product 1   Market 2

Market 1     Target 1

Product 1    Budget 1

Project 2     Product 3

Product 3   ....

 

I want to be abble to filter on Project 1 and see all the chain related to it. My idea was to create a second table like that:

ID                Name

Project 1     Blabla

Project 2     Hi

 

In the first table I'll use the path function to have the whole chain. And I'd like to create a column that says something like "If in the path there is Project1, display "Blabla"). This way I'd put a slicer with "Blabla, Hi" and all the other project.

 

But I'm struggling about creating this last column, as I can't reference the second table in my formula.

 

Does anyone have a solution how to do it, and how my formula should looks like?

 

Thanks in advance guys!!

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @tgo,

 

What does the second table look like? If you'd like to filter the IDs, I would suggest you do it like below.

1. Create a new table. 

New Table =
DISTINCT (
    UNION ( VALUES ( 'table 1'[ID from] ), VALUES ( 'table 1'[ID to] ) )
)

2. Create a measure.

Measure =
IF (
    MIN ( 'table 1'[ID from] ) = SELECTEDVALUE ( 'New Table'[ID from] )
        || MIN ( 'table 1'[ID to] ) = SELECTEDVALUE ( 'New Table'[ID from] ),
    1,
    BLANK ()
)

Finally, you can select one time to filter the two columns.

 

Best Regards,

Dale

Community Support Team _ Dale
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-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @tgo,

 

Could you please mark the proper answers as solutions please?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @tgo,

 

What does the second table look like? If you'd like to filter the IDs, I would suggest you do it like below.

1. Create a new table. 

New Table =
DISTINCT (
    UNION ( VALUES ( 'table 1'[ID from] ), VALUES ( 'table 1'[ID to] ) )
)

2. Create a measure.

Measure =
IF (
    MIN ( 'table 1'[ID from] ) = SELECTEDVALUE ( 'New Table'[ID from] )
        || MIN ( 'table 1'[ID to] ) = SELECTEDVALUE ( 'New Table'[ID from] ),
    1,
    BLANK ()
)

Finally, you can select one time to filter the two columns.

 

Best Regards,

Dale

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

@tgo

 

Use below DAX, before that Please create the Relation between both the Tables the Create the Calculated Column

 

Expected Results =
IF (
    'Sales Data'[Customer Name Index] = RELATED ( 'Customer Data'[Customer Index] ),
    "No Change",
    "Change"
)

 

 

Regards,

Chetan K

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.