The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello All,
I had a colunm that has text and numbers. I figured out how to split them as i needed to create a standard devation between two date ranges. Now i have split the columns but the colunm I split has "(" which is making it hard to change it to a date data.
Please let me know if anyone can help!
best
Solved! Go to Solution.
Hi,
Thanks for the solution @Greg_Deckler provided, and i want to offer some more information for user to refer to.
hello @Dklein , you can add a custom column.
Text.Remove([#"Invoice/Credits.2"],{"(",")"})
Output
And you can refer to the following code in advanced editor in power query.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W0jAyMDLWNTTSNTTRVIrVIU3AFF3ADCgQCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Invoice/Credits.2" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Invoice/Credits.2", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Remove([#"Invoice/Credits.2"],{"(",")"}))
in
#"Added Custom"
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks for the solution @Greg_Deckler provided, and i want to offer some more information for user to refer to.
hello @Dklein , you can add a custom column.
Text.Remove([#"Invoice/Credits.2"],{"(",")"})
Output
And you can refer to the following code in advanced editor in power query.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W0jAyMDLWNTTSNTTRVIrVIU3AFF3ADCgQCwA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Invoice/Credits.2" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Invoice/Credits.2", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Remove([#"Invoice/Credits.2"],{"(",")"}))
in
#"Added Custom"
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much for your assistance. The formula provided worked but it provided me an error message as this is a colunm i split from the original file. the colunm I am trying to remove the "( , )" is a delimiter split colunm so it states its not found in the original sheet. Is there anyway around this?
Please let me know!
Best,
Daniel
Thank you for the aid.
In the replace values section what do I add in to ensure the "( )" are gone on all of the lines. The only way its working right now, is if a type in the specific date range with thr ( ) and then replace it with just the date. As i have 1000+ lines, this is not the best option.
Sorry, i am new to Power BI!
Best,
Daniel
@Dklein In PQ, just do a Replace Values of ( with nothing and then the same for ). Just right-click the header of the column. Then maybe do a Transform | Clean.