Forum Discussion
Anonymous
6 years agoNot applicable
Cannot Convert Text to Decimal
Hi everyone! I think I tried posting this question but I'm not sure if it went through because I had to create an account.... so apologies if this is a re-post! I am new to the Power BI Community...
- Anonymous6 years ago
Hi Anonymous ,
Power BI can't recognize the "/" as "÷".
You can use Split feature in Query Editor then add a new column =column1/column2
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lkalawski
6 years agoResident Rockstar
Hi AlexandraC7,
The easiest way to get percentages is to perform these actions using additional columns.
1. Separate the denominator and denominator, and then add the column that will perform the (Custom) action.
2. Delete unnecessary columns.
#"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type", "Column1", Splitter.SplitTextByDelimiter("/", QuoteStyle.None), {"Numerator", "Denominator"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Numerator", Int64.Type}, {"Denominator", Int64.Type}}),
#"Added Conditional Column" = Table.AddColumn(#"Changed Type1", "Custom", each if [Denominator] = null then [Numerator] else [Numerator]/[Denominator]),
#"Changed Type2" = Table.TransformColumnTypes(#"Added Conditional Column",{{"Custom", Percentage.Type}})
_______________
If I helped, please accept the solution and give kudos! 😀