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
Anonymous
Not applicable

Power BI Querying Redshift DB via ODBC : Rows Reduction

Hi, my source is Redshift and I am connecting it via ODBC since I needed to get data via sql query. In my sql query, I am querying a single view with few where clauses to filter out data BUT I am getting rows with some additional filters applied automatically which are not present in the query.

 

Below is the sample query I am using.

select * from schema.view_name where column1 is not null and column2 = 'TEST'; 

In the result, surprisingly I can see 1 more filter getting applied which is  where column1 is not null and column2 = 'TEST' and column3 = 'boo'.

Can someone help me with it. Is my syntax incorrect or Power BI has some glitches with Redshift. let me know if more details are required
Please help @Greg_Deckler @amitchandak 

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

There may be two situations that cause your issue.

 

The first situation is to satisfy Column1=NULL and Column2=Test data only Column3=boo.

You can import all data and filter the column1 and column2, then check the data.

 

Power1.jpg

 

The second way maybe it has a filter and filter the column3 to be “boo”. You can check your filter and slicer.

 

Power2.jpg

 

If it doesn’t meet your requirement, could you please provide some screenshots to let us understand your issue more clearly?

Please don't contain any Confidential Information or Real data in your reply.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

There may be two situations that cause your issue.

 

The first situation is to satisfy Column1=NULL and Column2=Test data only Column3=boo.

You can import all data and filter the column1 and column2, then check the data.

 

Power1.jpg

 

The second way maybe it has a filter and filter the column3 to be “boo”. You can check your filter and slicer.

 

Power2.jpg

 

If it doesn’t meet your requirement, could you please provide some screenshots to let us understand your issue more clearly?

Please don't contain any Confidential Information or Real data in your reply.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you @v-zhenbw-msft , it was a stupid case of case sensitivity where column2 had 2 values ('Test' and 'TEST'). Due to redshift driver issues I wasn't able to query the view via SQL Client like SQL Workbench or DBeaver. So the only way I could explore the data was via loading it into Power BI. Power BI showed all values as 'TEST' only, not sure why. Hence all the confusion.

When I changed my query to upper(column2), I am getting expected results.

 

Anyways, thanks a ton for your time and help.  I apologize for such a silly question.

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.