Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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 )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |