Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello, I have a file that runs a macro, and then downloads some SAP records.
Then a query retrieves this data, but the thing is that when it brings the data, depending on the user's region, it could be downloaded as "en-US" which is american format for numbers, or it could be downloaded as European format.
The column can have up to 2 different number formats:
The column at first has a Text data type, and then when I transform it into Decimal data type, I get an error for the European records.
--> What I want to do is to standardize this into a single format, in this case, American Format "en-US".
I was thinking maybe with one of these formulas: Number.FromText () or Number.From() but I'm not being able to because
Maybe if I combine that function with a List function it could turn out.
I'm not profficient with M language so I could use a little help for this.
What I wanted with this approach is to create an error-proof step, so no matter where the user is from, that in the end the data is standardized into a single format.
Has anyone had this type of error before?
I don't know if my approach is correct or if there's a better way to solve this issue; to standardize multiple number formats of a column into a single format. Actually I want to apply this for several columns but knowing how to solve it for one, I can replicate that to the other necessary columns.
Thanks!
Solved! Go to Solution.
NewStep=Table.TransformColumns(PreviousStepName,{"ColumnName",each let a=Text.SplitAny(Text.From(_),",.") in Number.From(Text.Combine(List.ReplaceRange(a,List.Count(a)-1,0,{"."})),"en-US")})
Thanks a lot, we were struggling a lot with this issue, you saved us!
NewStep=Table.TransformColumns(PreviousStepName,{"ColumnName",each let a=Text.SplitAny(Text.From(_),",.") in Number.From(Text.Combine(List.ReplaceRange(a,List.Count(a)-1,0,{"."})),"en-US")})
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.