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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MicrosoftPBI
New Member

Filtering DirectQuery table based on import mode table

Hi!
I have two tables:
Table A (directquery from cloud dataset), contains most KPI-s and value X
Table B (import mode SQL query), contains value X

I need to show all Table A data except rows where value X is also in table B. So in other words I need to show all table A data except where value X in table A matches with value X in table B. 
I have the solution using DAX table, but since I am working with directquery dataset, the DAX table causes this error when refreshing the report in PBI cloud:

  •          "Refresh is not supported for datasets with a calculated table or calculated column that depends on a table which references             Analysis Services using DirectQuery."

How can I filter table (based on Directquery) to exclude rows which have matching values in column X while keeping cloud refresh functionality?


Thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@MicrosoftPBI , You can create a measure like this and use in visual or visual level filter

 

assume ID column is key in both 

 

Countrows(filter(TableA, not TableA[ID] in values(TableB[ID]) ) )

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

5 REPLIES 5
MicrosoftPBI
New Member

Thank you very much.
Instead of having to create a DAX table, I was able to use this DAX measure and use it on the table level as filter. The PBI cloud refresh works, thanks!

Can you provide the solution here so others can benefit from this

amitchandak
Super User
Super User

@MicrosoftPBI , You can create a measure like this and use in visual or visual level filter

 

assume ID column is key in both 

 

Countrows(filter(TableA, not TableA[ID] in values(TableB[ID]) ) )

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

What a helpful post.  Thank you.  I was struggling to filter a Direct Query reusable date dimension table by the date range in a transaction table.  The date table has too many pivotal attribute columns to recreate in DAX, all organized into folders.  This technique is also useful for limiting slicers on the Direct Query table based on the transaction date range in an import table. 

When using this filter, set the filter to Greater than Zero, or something else?

Thanks for your help.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.