Forum Discussion
Jos1986
2 years agoFrequent Visitor
Dataflow Edits Not Showing in Reporting
I am trying to edit the sales revenue on a particular invoice via our dataflow (yes, usually we'd take care of this in ERP but we don't want to disrupt the customer with a credit and re-bill). Here's the code:
Table.ReplaceValue(#"Replace errors",
each [Sales],
each if [Document Number] = "30005285" then 10000 else [Sales],
Replacer.ReplaceValue, {"Sales"})
It works, as I can visually see the edits to the rows needing to show 10,000. However, upon saving the dataflow Power BI inserts two clean up steps of code. They are:
Table.TransformColumnTypes(#"Replaced value", {{"Sales", type text}})
Table.ReplaceErrorValues(#"Transform columns 1", {{"Sales", null}})
These steps essentially negate the code I was trying to insert. The dataflow behaves as it always had. New even revenue still flows through to reporting. It's like my code never existed. Any ideas how to fix? I find it odd Power BI thinks my Sales column needs to turn into text. My intention is for it to be a decimal number.
1 Reply
- DataInsightsSuper User
The system-generated steps appear to be a result of the resulting Sales column being untyped. When I added a step to change the data type of Sales (after your transform step), the system-generated steps did not appear. Example:
Table.TransformColumnTypes(ReplaceSales, {{"Sales", type number}})