Forum Discussion
Carry over superscript formatting from Excel to Power BI
- 10 months ago
Hi Jason2023 ,
I am not sure how it will helps you but you can try with creating a custom column and paste below provided code in the custom column pop up box and replace your column with your actual column name.// Add this as a New Custom Column formula in Power Query let txt = [YourColumn], replacements = { {"0","⁰"}, {"1","¹"}, {"2","²"}, {"3","³"}, {"4","⁴"}, {"5","⁵"}, {"6","⁶"}, {"7","⁷"}, {"8","⁸"}, {"9","⁹"}, {"(n)","(ⁿ)"}, {"+","⁺"}, {"-","⁻"} }, result = List.Accumulate(replacements, txt, (state, r) => Text.Replace(state, r{0}, r{1})) in resultThanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Hi Jason2023 ,
I am not sure how it will helps you but you can try with creating a custom column and paste below provided code in the custom column pop up box and replace your column with your actual column name.
// Add this as a New Custom Column formula in Power Query
let
txt = [YourColumn],
replacements = {
{"0","⁰"},
{"1","¹"},
{"2","²"},
{"3","³"},
{"4","⁴"},
{"5","⁵"},
{"6","⁶"},
{"7","⁷"},
{"8","⁸"},
{"9","⁹"},
{"(n)","(ⁿ)"},
{"+","⁺"},
{"-","⁻"}
},
result = List.Accumulate(replacements, txt, (state, r) => Text.Replace(state, r{0}, r{1}))
in
result
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
This got me the exact result needed - much appreciated!
- ajaybabuinturi10 months ago
Super User
Please accept a solution and give kudos
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.