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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

Encoding numbers to text

Hello,

 

I have a unique situation where most of my values are coming in as their actual text value, but some are being decoded as a numeric value.  

 

For example, 12345 would be encoded as MTIzNDU=  Basically, I'm only looking to encode the numeric values within the column.

 

With that said, is there a function out there that I can convert just the numeric values to their perspective text values?

 

Thank you for your help.

Pete 

1 ACCEPTED SOLUTION

Hi @Anonymous

In power query, set the data type of the "value" column to be "any".

 

Best Regards

Maggie

View solution in original post

5 REPLIES 5
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Here are two options for your reference

 First create a custom column

Custom=Value.Is([value],Int64.Type)

7.png

  1. add a conditional column

 6.png

Corresponding M query:

= Table.AddColumn(#"Added Custom", "Custom.1", each if [Custom] = true then "Basically" else [value])
  1. Replace values on original column directly.

8.png

= Table.ReplaceValue( #"Added Custom" ,each [value],each if [Custom] = true then "Basically" else [value],Replacer.ReplaceValue,{"value"})

Best regards,
Maggie

Anonymous
Not applicable

Hi Maggie,

 

Thank you very much.  I will try these solutions and will let you know how I make out.

 

Regards,

Pete

Anonymous
Not applicable
Anonymous
Not applicable

When I tried the above solution, the values within my custom column are all set to FALSE, even the numeric values.

Hi @Anonymous

In power query, set the data type of the "value" column to be "any".

 

Best Regards

Maggie

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.