Forum Discussion
can we have Any to Text conversion fixed?
This is the storage mechanism of floating point numbers inside the computer and cannot be easily modified. Although there is a Decimal type in Power Query that can accurately represent decimals, this type only exists inside the calculation and cannot be represented externally (can be passed to DAX). For your problem, you may try to nest a Decimal.From function outside the number.
Text.From(Decimal.From(0.1+0.2)) & "AAA"
- Marpas1 year agoHelper I
what would be a result of this function if input is "123 & 234"?
- ZhangKun1 year agoSuper User
Sorry for ignoring your reply. "123&234" cannot be used as input because it is a string. If multiple inputs are required, additional judgments can only be added. Also, I have found a confusing question, why is your result different from mine, a version issue?
- Marpas1 year agoHelper I
Hi ZhangKun,
No worries.
Unfortunately, I can't restrict what users would put as data. Plenty of records have value of "123 & 234" or similar and they intent to keep it this way for a while.
Why it works fine for you but not for me? not a clue, makes no sense, seems like bug to me.
Or you are checking it in Power BI Desktop / Transform Data (Report's semantic model), while I have this issue in Power BI Service / Dataflow gen1.
inb4: if Semantic model converts Any to Text just fine, why not skip conversion in Dataflow and do it in Semantic model instead?
I've tried that, but Dataflow forces conversion as last step of table transformations. If that step is deleted, it will be recreated automatically during close.