Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi , with your great help i have managed to create a formula which works fine for the most :
Solved! Go to Solution.
Hi @bilingual ,
All you have to do is check if Search returns 1, i.e. LH is in the first two places.
Change your measure to:
Type = SWITCH(
TRUE(),
SEARCH("S2OLDC",'Data'[Type],1,0) > 0 , "Working function",
SEARCH("LH",'Data'[Type],1,0) = 1 , "Standby function",
The search formula returns the index at which the search expression begins.
https://www.tutorialspoint.com/dax_functions/dax_search_function.htm
_______________
If I helped, please accept the solution and give kudos! 😀
Hi @bilingual ,
All you have to do is check if Search returns 1, i.e. LH is in the first two places.
Change your measure to:
Type = SWITCH(
TRUE(),
SEARCH("S2OLDC",'Data'[Type],1,0) > 0 , "Working function",
SEARCH("LH",'Data'[Type],1,0) = 1 , "Standby function",
The search formula returns the index at which the search expression begins.
https://www.tutorialspoint.com/dax_functions/dax_search_function.htm
_______________
If I helped, please accept the solution and give kudos! 😀
Thanks al lot, it worked perfectly, i read your explanation, so the =1 "locks" that the first 2 characters needs be "LH", whereas >0 just indicate that "LH" has to be somewhere in the string?
Yes, it is exactly as you wrote.
Regards
Lukasz
_______________
If I helped, please accept the solution and give kudos! 😀
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
77 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |