Forum Discussion
Power Query yields different row count when filtering where value <> 0
Hi guavaq,
Thakgs for the response. I implemented your recommendation for the Advanced filter, ensuring the type is set to decimal in a prior step. I did this for all queries in the workbook. Unfortunately, I am seeing the same thing. RE: the DB question, the DB is static.
I went through a process of creating a copy of the query, removing steps and writing to a table. I then ran the query multiple times to see if I would get a different number of row counts. If the same row count was achieved each run, then I deleted the query, made a new copy, and added in one more step from the original query, then re-ran multiple times. The point of all of that was to isolate where in the query the different row counts was occurring. It isn't happening until the last step, which happens to be the filter for non zeros.
Any other ideas? Almost seems like it is some sort of issue/bug with PQ. When I used the Advanced filter, is there any way within the code to see if the filter was set using the Advanced filter option? I didn't see anything different.
Thanks,
When a filter is being applied to a text value it would be wrapped in the double quotes EG: "89", whilst if it is a number value it would just have the number EG: 89
Here is an example where I am filtering a Run Number greater than 101, where the column is set to Whole Number
#"Filtered Rows" = Table.SelectRows(#"Removed Other Columns", each [Run] < 101),