Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

is there a formula that can trim or replace at certain char?

I have a column that has Completed Items. The data in each row in Completed Items is represented as example 1/4, or 5/10 (which is like saying one out of four items). I have created a new column (let's call it Open Items) from the existing data set. So now, I would like to trim (not sure that's the right term to use) what's in Completed Items column and the data in the new column. I'm reading up on different dax formulas... TRIM, REPLACE, SUBSTITUTE, however none of these appear to do what I need done.

 

Completed Items     --> new look should be Completed Items

-------------------                                            -------------------

1/4                                                                  4

5/10                                                                10

0/3                                                                   3

 

Any one know how to accomplish this in Power BI using a DAX formula? I really do not want to manipulate the data in the Excel.  Appreciate your support.

3 ACCEPTED SOLUTIONS
darentengmfs
Post Prodigy
Post Prodigy

Hi @Anonymous 

 

Can you use Power Query to do this?

 

Power Query > Split Column > By Delimiter

 

If you still need your old column, duplicate that column and use Split Column on the duplicated column instead.

 

 

If you need to use DAX to do it, use this formula:

Completed Items_New = Right('Table'[Completed Items], LEN('Table'[Completed Items])-FIND("/",[Completed Items])+1)

 

Where Completed Items is your current column and Completed Items_New is the new column.

View solution in original post

ryan_mayu
Super User
Super User

@Anonymous 

you can also try this

Column = RIGHT('Table'[Column1],len('Table'[Column1])-find("/",'Table'[Column1]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Anonymous
Not applicable

@ryan_mayu- i have tried your solution and it works. Exactly what I'm looking for. Thank you! Accepted as solution.

 

View solution in original post

5 REPLIES 5
ryan_mayu
Super User
Super User

@Anonymous 

you can also try this

Column = RIGHT('Table'[Column1],len('Table'[Column1])-find("/",'Table'[Column1]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

@ryan_mayu- i have tried your solution and it works. Exactly what I'm looking for. Thank you! Accepted as solution.

 

Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

Power Query is more intuitive for this case, add a new column with the data after delimiter "/":

 

Table.AddColumn(your previous step, "new column name", each Text.AfterDelimiter([your original column],"/"))

darentengmfs
Post Prodigy
Post Prodigy

Hi @Anonymous 

 

Can you use Power Query to do this?

 

Power Query > Split Column > By Delimiter

 

If you still need your old column, duplicate that column and use Split Column on the duplicated column instead.

 

 

If you need to use DAX to do it, use this formula:

Completed Items_New = Right('Table'[Completed Items], LEN('Table'[Completed Items])-FIND("/",[Completed Items])+1)

 

Where Completed Items is your current column and Completed Items_New is the new column.

Anonymous
Not applicable

This solution works as well. I am grateful for your knowledge!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors