Values changing to Null for no obvious reason

baitmaster

Well-known Member
Joined
Mar 12, 2009
Messages
2,042
Good afternoon all

I have a Power BI Query that's extracting a load of data from a SQL Server database. I then perform several steps in Power Query, but at some point, for no obvious reason (that I can see), most of my numbers turn to NULL.

The numbers are different currency versions of the same thing, all stored on the server. Advanced Editor shows the following
Rich (BB code):
let
    Source = Sql.Databases("xxxx"),
    #"xxxx" = Source{[Name="xxxx"]}[Data],
    dbo_FactAccountsReceivable = #"xxxx"{[Schema="dbo",Item="FactAccountsReceivable"]}[Data],
    #"Removed Columns" = Table.RemoveColumns(dbo_FactAccountsReceivable,{"Days to Pay", "Settlement", "Document Number", "Current Status", "ea_Is_Deleted"}),
    #"Filtered Rows" = Table.SelectRows(#"Removed Columns", each true),
    #"Duplicated Column" = Table.DuplicateColumn(#"Filtered Rows", "Voucher", "Voucher - Copy"),
    #"Extracted First Characters" = Table.TransformColumns(#"Duplicated Column", {{"Voucher - Copy", each Text.Start(_, 4), type text}}),
    … ...

I'm fine removing columns and filtering but at the point when I duplicate a column, many of my numbers turn to NULL. The column I'm duplicating is a simple text field and is unrelated to the values. There's no change to the number type, and no update from the database. Why would this happen?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Solution found. The issue affected all columns with >2 DPs. They were formatted as decimal numbers (should be fine right? no...) but swapping to fixed decimal numbers stopped this bug reoccuring
 
Upvote 0

Forum statistics

Threads
1,223,806
Messages
6,174,725
Members
452,578
Latest member
Predaking

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top