The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have setup a direct query and my table look like the below
Country Table
ID Country Code Countries Measure
X BE BE, NL, FR, LU TRUE
Y DE BE, NL, FR, LU FALSE
I want to create measure, which tells me whether the value (always one) under "Country Code" is part of the "Countries".
Any hint would be appreciated.
Thank you!!
Hi @Anonymous , Thanks for your query.
Here is the solution:
Check =
VAR CountryVal = MIN( 'DataTable'[Country Code] )
VAR CheckVal = SWITCH(
TRUE(),
CONTAINSSTRINGEXACT(MIN('DataTable'[Countries]), CountryVal), "Yes",
"No")
RETURN
CheckVal
** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search and help others. Thank you ! Good Luck 👍 |
Measure = CONTAINSSTRING(SELECTEDVALUE([Countries]), SELECTEDVALUE([CountryCode]))
something like the above should work.