Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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.
Solved! Go to Solution.
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
you can also try this
Column = RIGHT('Table'[Column1],len('Table'[Column1])-find("/",'Table'[Column1]))
Proud to be a Super User!
@ryan_mayu- i have tried your solution and it works. Exactly what I'm looking for. Thank you! Accepted as solution.
@Anonymous
you can also try this
Column = RIGHT('Table'[Column1],len('Table'[Column1])-find("/",'Table'[Column1]))
Proud to be a Super User!
@ryan_mayu- i have tried your solution and it works. Exactly what I'm looking for. Thank you! Accepted as solution.
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],"/"))
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.
This solution works as well. I am grateful for your knowledge!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 39 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |