Forum Discussion

MattKarriker2's avatar
MattKarriker2
Helper II
5 years ago
Solved

Pushing Filters to Database for Direct query reports

Good afternoon Forum

I am looking for advice on how I can push metric filters to the Database level for a Direct query model.  My solutions is a large composite model for inventory.  We snapshot ~20M rows of data per day in this inventory system.  Aggregated levels of data perform well since they are imported tables.  However we are running into resource constraints when querying this system at the daily level becuase these queries are hitting the database directly and we are running up against the 1M row intermediate table limitation in GEN2.  We were able to get around this issue with GEN1 by upping the intermediate table limit.  This setting is not available on GEN2.  I feel we could get around this error if I could pass metric filters to the database level. 

 

One example is we have a query looking to return store/UPC combinations with overstock of 250 units or more.  The query passed to the database returns 3M+ rows and exceeds the 1M row intermediate table limit of GEN2.  This is because the query is pulling all store and UPC lvel data into Power BI and then applies the filter to the measure after the data is returned.  If the measure filter could be applied to the query and pushed to the database level the returned set is only 13K rows.  

 

Has anyone else run into this issue and did you find a solutions to limit the number of returned from the direct query.

2 Replies