Forum Discussion
Alisea_MI
Resolver II
5 years agoDax if string starts with text
Hi, I am new to Power BI and would highly appreciate help with a calculated column that takes the first character from a string, and if it is "7", returns "SMED (7xxx)", if a string starts with "...
- 5 years ago
Hey Alisea_MI ,
sure, that's possible.
Add the following calculated column:
My String Check = IF( LEFT( myTable[SempleContractNo], 1 ) = "7", "SMED (7xxx)", IF( LEFT( myTable[SempleContractNo], 1 ) = "8", "SMED (8xxx)", BLANK() ) )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
amitchandak
Super User
5 years agoAlisea_MI , You Can try a new column
switch(True(),
left([column],1) = "7","SMED (7xxx)",
left([column],1) = "8","SMNA (8...)"
)