cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Giavo
Helper III
Helper III

path

Hello, i have one interesting question, i have a Path  column(19 levels down) and SubPath column

 

 

Path Column,   Sub-Parh Column

A/B/C                      B/C

A/B/D                      B/D

A/B/E                       B/E

 

I want to identify if Path column contains in it(at any level) a SubPath column's value, so in the middle of Path Column does the Sub-Path column's value exist?. Return true in case it contains it, else false. Tried with IF(CONTAINS, but it didn't work because it return only when you have the exact match between the 2 columns(for example if Path Column=A/B/C and the Sub-Path contains again A/B/C it works because they are exactly same, but if Sub-Path is on A/B it doesn't give me true). Can you help me please?

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft
Microsoft

Hi @Giavo,

 

Please try this formula:

Column =
IF (
    ISERROR ( FIND ( 'Path'[Sub-Path Column], 'Path'[Path Column] ) ),
    "False",
    "True"
)

1.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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-yulgu-msft
Microsoft
Microsoft

Hi @Giavo,

 

Please try this formula:

Column =
IF (
    ISERROR ( FIND ( 'Path'[Sub-Path Column], 'Path'[Path Column] ) ),
    "False",
    "True"
)

1.PNG

 

Best regards,
Yuliana Gu

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

Do you think that it is possible in Power BI to Highlight or put in Evidence some how the Sub-Path part inside the Path column ? So if TRUE then i would like that part be highlighted inside Path

Thank you very much Yuliana, it worked 🙂

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors