Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply

I want to convert decimal digits to percentage in a column that has multiple data types in Power BI.

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

Ayush_tiwari08_0-1676387951391.png

OUTPUT I AM EXPECTING 

Ayush_tiwari08_1-1676387998968.png

 

3 REPLIES 3
Ahmedx
Super User
Super User

Ahmedx
Super User
Super User

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.

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors