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 - I want to see if a column starts with a specific line of strings (e.g. "992"). How can I do that in DAX (not power query)?
Thanks in advance!
Solved! Go to Solution.
Hi @PowerBI123456 ,
Try the following:
LEFT(Table[Column]), 3) = "992"
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @PowerBI123456 ,
Try the following:
LEFT(Table[Column]), 3) = "992"
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsAnd what about cases where length of the string I'm looking for vary? For example {"site", "location"}
What do you mean by having a different length?
This is for the beginning of the text so it does not matter the size of the text.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsIf I want to look for different words (example list in { }) which differ in length if text starts with those and depending on which does it start with, take different action
Then you can use MID() instead of LEFT()
@PowerBI123456 , Try a new column like
if(left([col1],3) = "992",1,0)
or measure
calculate(countrows(Table),filter(Table,left([col1],3) = "992",1,0))
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |