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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Related column and conditional column

hi all...

I have a column value using related.

for example, how do i create a column, if country has Asia, then "Asia" else "others"

 

I am not able to use conditional column? Any advice is grateful.

 

 

 

 

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@Anonymous 

try

SWITCH(
TRUE(),
CONTAINSSTRING(Table[Country],"AsiaPac")=TRUE(), "AsiaPac",
CONTAINSSTRING(Table[Country],"Asia")=TRUE(), "Asia",
"Others"
)

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

4 REPLIES 4
sanalytics
Super User
Super User

Hey @Anonymous ,

Hey You can try below one also,

IF(CONTAINSSTRING(Table[Country],"Asia")=TRUE(),"Asia","Others")
Regards,
Snandy
Anonymous
Not applicable

@sanalyticsThanks,it work, i tried using 3 conditional but not sure how to do it.

any idea

 

condition1 - if table contain Asia - then asia

condition1 - if table contain AsiaPac - then asiaPc

else Others

az38
Community Champion
Community Champion

@Anonymous 

try

SWITCH(
TRUE(),
CONTAINSSTRING(Table[Country],"AsiaPac")=TRUE(), "AsiaPac",
CONTAINSSTRING(Table[Country],"Asia")=TRUE(), "Asia",
"Others"
)

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
az38
Community Champion
Community Champion

Hi @Anonymous 

it should be enough:

Country = IF(FIND("Asia"),RELATED(CountryCode[Country])) > 0, "Asia", "Others")

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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