I want to convert decimal digits to percentage in a column that has multiple data types in Power BI. How do I achieve this using query/measure in Power BI?
Note: I want all the values in a single column as expected in output example is that possible to create?
Input data: Data type of the column: Any
OUTPUT I AM EXPECTING
you can download from here
https://wdfiles.ru/396ba30
or
https://www48.zippyshare.com/v/tmUelxqq/file.html
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText(
"i45WMlCK1YlWMgKTJmDSL1/BsaAgJzM5MSknFYeIgY6xqTmUZWBgaQETNDE1U4qNBQA=",
BinaryEncoding.Base64
),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [Column1 = _t]
),
typCh = Table.TransformColumnTypes(Source, {{"Column1", type text}}),
Fx = (x) =>
if Text.Contains(x, "0,") then
Text.From(Value.Add((Number.FromText(x) * 100), 0, Precision.Decimal)) & " %"
else
x,
Result = Table.TransformColumns(typCh, {"Column1", Fx})
in
Result
Sample PBIX file attached
https://dropmefiles.com/3LCjD
Hi the file link which you have shared is not working.
User | Count |
---|---|
121 | |
61 | |
56 | |
46 | |
41 |
User | Count |
---|---|
116 | |
66 | |
61 | |
60 | |
45 |