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.
Hi Everyone,
I have encountered an odd error where a query in SQL Server and the same query in PBI are returning different results. For example, this query in SQLServer :
SELECT Count(*) FROM Contract WHERE Contract.IssueNumber = 1 AND Contract.ContractCreateDate > '01/06/2020'
Returns 251 rows (this is what is expected) but importing the contract table and filtering by IssueNumber and ContractCreateDate is giving me only 214 rows. This is a very simple query so I'm kind of lost as to where I went wrong. Can anyone give me any pointers on this?
Hi @David_Service ,
Hope this post could help you: Rows missing in imported data from SQL-Connection (Power BI desktop).
I managed to solve the issue and it indeed had to do with the column formating. The data format for the matching columns in the query merge were data type 'Any' for both columns.
For some reason most rows matched except a few rows apparently having a different format. I changed the format of the matching ID columns to 'Text' which solved the issue.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check if there is a limit of data imported from SQL server into Power BI. Sometimes there is a limit of 2000 Rows in SQL server therefore the countrows in power bi will be different as it could be missing some rows.
Your issue might be similar to this one
Regards
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
108 | |
90 | |
64 |