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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Lisa_2021
Helper II
Helper II

List.Accumulate replacing text with numbers

Hi,

is it possible to replace text with numbers?  this formula works if I replace text with text but not with numbers?

= Table.AddColumn(#"Filtered <> 0", "Metric Index", each List.Accumulate (
List.Numbers (0, Table.RowCount (dim_metric_index)),
[METRIC],
(state, current) =>
Text.Replace (state, dim_metric_index[Metric]{current},
dim_metric_index[Metric Index]{current} )
))

Thank you so much!!

Lisa

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Lisa_2021 
You can use Replace.ReplaceValue instead of Text.Replace.

For more information please refer:

https://gorilla.bi/power-query/replace-values/

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @Lisa_2021 
You can use Replace.ReplaceValue instead of Text.Replace.

For more information please refer:

https://gorilla.bi/power-query/replace-values/

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you!!  

Glad to help 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.