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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jdubs
Helper V
Helper V

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. 

1 ACCEPTED SOLUTION
jdubs
Helper V
Helper 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. 

View solution in original post

7 REPLIES 7
jdubs
Helper V
Helper 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. 

jdubs
Helper V
Helper V

This is the x64 build of Power BI Desktop btw

jdubs
Helper V
Helper 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. 

@jdubs 

I just connected to a local host SQL server from Power BI Dec 2023 version and it works:

Fowmy_0-1705685094512.png

Fowmy_1-1705685107799.png
Check if any permission issues exist.

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

jdubs
Helper V
Helper V

Select column1, column2, column3, column4 from table where trueorfalsevalue = 1

 

It loads the columns but 0 rows are returned

@jdubs 

Not enough context and details to understand your issue. could share more info, wher have you written the code? show the result of the T-SQL result and in the Power BI.


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Fowmy
Super User
Super User

@jdubs 

Can you show how you have written the DAX query based on the T-SQL ?


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.