Forum Discussion

Andrew__K's avatar
Andrew__K
Brass Contributor
Mar 14, 2024

Power Query not behaving as expected.

I use a Power Query that pulls data from files in a folder, the data is a daily report of product that has been transferred from one warehouse to another. Typically, the cartons of product are scanned to a pallet number (SSCC) and the SSCC is transferred between warehouses. 

 

I use the Sample File (First file in folder) to transform and filter out unwanted columns/rows, then the main query groups the product by the SSCC, etc...

 

The PQ has worked fine since I created it, however, I recently came across an issue when for the first time a single carton that hadn't been scanned to an SSCC was transferred between warehouses.

 

The SSCC number is in column 8 of below examples of source data, when the single carton without an SSCC number is included (highlighted below), it shows the cell as empty, and the product rows below it have the SSCC as usual. However, when processed by the query, it is showing every row as null in column 8. 

 

I would expect null for the empty cell, the row without an SSCC number, but I can't figure out why it is showing null for every row... 

 

Far as I can tell, the source data is no different, other than the cell missing the SSCC number. Even when I change the sample file source to the problem file, the whole column shows null at the first step.

 

Can anyone point out something I'm missing, or what I can do to fix? Any help would be appreciated! Thank you.

 

Example 1 - Typical source data, PQ works as expected.

 

 

Example 2 - Source data with single missing SSCC number (Col-8)

 

2 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Andrew__K 

    It looks like the file with the empty Column 8 is taken as the sample file and that column is ignored for all other files.

    You need to check query Transform Sample File in Transform File from SomeName group and edit it manually if necessary. Pay attention to parameters for the source file loading. And be careful with changing of that query, better to play on copy of you main file first.

Resources