Forum Discussion
Same exact SQL query returns 0 rows in Power BI
This is a new one. Very simple SQL query returns 0 rows in Power BI. I have literally copied and pasted the query directly from SQL. And no, I am not drunk.
Very strange. I used ODBC as the data source and it worked fine. Maybe it isn't returning all rows? The particular values (i.e. "True") aren't even showing as available values when I filter the column. There are only about 9 rows (out of hundreds of thousands) that meet this criteria.
Anyway, moving on.
7 Replies
- jdubsHelper V
Very strange. I used ODBC as the data source and it worked fine. Maybe it isn't returning all rows? The particular values (i.e. "True") aren't even showing as available values when I filter the column. There are only about 9 rows (out of hundreds of thousands) that meet this criteria.
Anyway, moving on.
- jdubsHelper V
Select column1, column2, column3, column4 from table where trueorfalsevalue = 1
It loads the columns but 0 rows are returned
- jdubsHelper V
So this is in Power Query. I'm trying to set up the data source. I select SQL Server, enter the server name and database and then enter my query as above. I copied and pasted it directly from my SQL server where I know the syntax is correct and returns data. However, no data is returned here.
Oddly, if I select ODBC as my data source and enter all the same information, data is returned correctly.
Of note is that I just updated to the Dec. '23 release of Power BI and am wondering if that has something to do with it. I have never had this problem before.
- jdubsHelper V
This is the x64 build of Power BI Desktop btw