Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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))
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
87 | |
84 | |
68 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |