Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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 "8", returns "SMNA (8...)". Else null.
Would be grateful for all the help!
Solved! Go to Solution.
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()
)
)
@amitchandak , I hope you don't take offence, both variants work fine, but I only can set one to "correct", so I too the first one. Thank you once more!
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()
)
)
Hi @selimovd
Thanks for the Idea which you are commented for this post
i am also facing same issue but it need's some more debugging in the dax, i have attached the screen shot appreciate your help on this
Scenario : I need to create on matrix table in power bi and in the row feild i am using variable names
So my requirment is if value is "starting" with Budget then one color else another color
So that users can seggregate the budget and actual in easy way
but inside table there one text start with Tyre Budget so that i need some idea how to over come this sitation
Thanks
Hoping Best Solutions
Alan
@Alisea_MI , You Can try a new column
switch(True(),
left([column],1) = "7","SMED (7xxx)",
left([column],1) = "8","SMNA (8...)"
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.