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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
dssharma
Regular Visitor

How to filter data in Power BI desktop in direct query mode (IBM DB2)

Hello,

 

Could anyone please educate me on how to filter the data in power bi in direct query mode. We are using a DB2 database and there is no option to connect to the DB2 database in import mode and hence I am not able to filter the data. The database server is located remotely and there are some millions of rows. I could do the filtering in Import mode but not in Direct query mode.

 

Could anyone please help.

 

Thanks in advance.

 

DS Sharma

4 REPLIES 4
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

Hi @dssharma,

Do you get the option “Edit Query” by righting click the table in Power BI Desktop? If the option exists, you are able to filter data in Query Editor.
Capture1.PNG

 

If the above option doesn’t exist, expand SQL Statement(optional) when you connect to IBM DB2, write a specific database query that returns your expected data.


Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2016-08-01_15-13-56.jpg

 

Hello Lydia,

 

Thanks for your message. I have done some filtering in the edit query and I have clicked on Close and Apply. After that the data starts loading and I get this error message. Could you please help.

 

 

We received the same error, performing the same steps outlined above.  Is there a "work-around"?

Hello Karen,

 

What type of Connection are you using? ODBC or .net connector for DB2. Can you try with .net Connector for DB2 and then try filtering.

 

DS Sharma

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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