Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hey All,
I have a column that is ticket numbers like SCTASK0012345, WKR0012345 etc. I need to extract all the text before the numbers to create a column for "Ticket Type". This data set comes from SNOW - SQL SERVER - POWER BI - FABRIC. I cant edit it in the desktop version and upload so I need the DAX expressions to do this in fabric.
Update: The below works sort of but it now returns as WRK0,INC0 etc. I tried putting a K,C in place of 0 but Returned in error.
Thanks!
Solved! Go to Solution.
Hi,
Try something like below whether it suits your requirement.
It is for creating a calculated column.
TicketType =
LEFT ( query1[Number], SEARCH ( 0, query1[Number] ) - 1 )
Hello @Creature,
Can you please try this approach:
TicketType =
VAR FirstDigitPosition =
MINX(
FILTER(
GENERATESERIES(1, LEN('query1'[Number])),
MID('query1'[Number], [Value], 1) >= "0" && MID('query1'[Number], [Value], 1) <= "9"
),
[Value]
)
RETURN
LEFT('query1'[Number], FirstDigitPosition - 1)
Step 1 -- go to power query
step-2
step -3 in there a option is extract click on that.
step : 4 select last characters
step : 5 enter how many ending characters to keep .
let me know if you still help
Best,
Laxman babu
Hi,
Try something like below whether it suits your requirement.
It is for creating a calculated column.
TicketType =
LEFT ( query1[Number], SEARCH ( 0, query1[Number] ) - 1 )
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |