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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Jos1986
Frequent 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 1
DataInsights
Super User
Super User

@Jos1986,

 

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}})

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.