Forum Discussion
01_RAF_01
4 years agoFrequent Visitor
Text functions DAX
Hi Guys, im looking for a method to achieve the following. I have 2 columns. the first colomn contains names (name) and the other colums countries (country). Now im looking to make anoth...
- Anonymous4 years ago
Hi 01_RAF_01
can you please try
if(Table[Country] in {'USA','FR'},
if(LEFT(Table[name],1) in {'m','n','o','p','q','r','s','t','u','v','w','x','y','z'},"YES","YESSS"),"NO")
Samarth_18
4 years agoCommunity Champion
Hi 01_RAF_01 ,
You can try below code:-
Column =
VAR startswith =
LEFT ( Country_data[Name], 1 )
VAR result =
IF (
startswith
IN { "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" },
TRUE (),
FALSE ()
)
RETURN
IF (
result
&& Country_data[Country] IN { "USA", "FR" },
"Yes",
IF (
result = FALSE ()
&& Country_data[Country] IN { "USA", "FR" },
"YESSS",
"NO"
)
)Output:-
Thanks,
Samarth