Forum Discussion
Power BI Direct Query Measure Issue with 1M rows...
HI Anonymous,
I think you can follow officiate document to work through the issue, but it will affect the performance.
Limitations of DirectQuery
There are currently a few limitations to using DirectQuery:
-
All tables must come from a single database
-
If the Query Editor query is overly complex, an error will occur. To remedy the error you must either delete the problematic step in Query Editor, or Import the data instead of using DirectQuery. For multi-dimensional sources like SAP Business Warehouse, there is no Query Editor
-
Relationship filtering is limited to a single direction, rather than both directions (though it is possible to enable cross filtering in both directions for DirectQuery as a Preview feature). For multi-dimensional sources like SAP Business Warehouse, there are no relationships defined in the model
-
Time intelligence capabilities are not available in DirectQuery. For example, special treatment of date columns (year, quarter, month, day, so on) are not supported in DirectQuery mode.
-
By default, limitations are placed on DAX expressions allowed in measures; see the following paragraph for more information
-
There is a 1 million row limit for returning data when using DirectQuery. This does not affect aggregations or calculations used to create the dataset returned using DirectQuery, only the rows returned. For example, you can aggregate 10 million rows with your query that runs on the data source, and accurately return the results of that aggregation to Power BI using DirectQuery as long as the data returned to Power BI is less than 1 million rows. If more than 1 million rows would be returned from DirectQuery, Power BI returns an error.
To ensure that queries sent to the underlying data source have acceptable performance, limitations are imposed on measures by default. Advanced users can choose to bypass this limitation by selecting File > Options and then Settings > Options and settings > DirectQuery, then selecting the option *Allow unrestricted measures in DirectQuery mode**. When that option is selected, any DAX expression that is valid for a measure can be used. Users must be aware, however, that some expressions that perform very well when the data is imported may result in very slow queries to the backend source when in DirectQuery mode.
Use DirectQuery in Power BI Desktop
Regards,
Xiaoxin Sheng
Hello Anonymous,
I already have unrestricted measures with direct query ON...
Referring to the bullet:
There is a 1 million row limit for returning data when using DirectQuery. This does not affect aggregations or calculations used to create the dataset returned using DirectQuery, only the rows returned. For example, you can aggregate 10 million rows with your query that runs on the data source, and accurately return the results of that aggregation to Power BI using DirectQuery as long as the data returned to Power BI is less than 1 million rows. If more than 1 million rows would be returned from DirectQuery, Power BI returns an error.
My dataset is not returning more than 1 million rows... it is a simple count measure for a filtered table...
I guess there must be something happening in between that is invalidating this. Would be interesting to debug it.
- Anonymous8 years agoNot applicable
Hi Anonymous,
I find your have invoked other measure as the condition for filter, I'm not so sure combine use multiple measures with caused the issue.(if other measure has some operation will loop all table with complex operations)
Regards,
Xiaoxin Sheng
- Anonymous8 years agoNot applicable
Hi Anonymous,
The other measure is also very simple:
Measure X = CALCULATE(DISTINCTCOUNT('Table1'[ID]); 'Dim1'[Atribute1] = "FilteredValue")- Anonymous8 years agoNot applicable
Hi Anonymous,
I found your measure calculate through multiple tables, I think the issue may related to loop calculate, count of the calculate exceed the 1M.
For example:
Table1, 10k + rows, dim table, 100k+, loop calculation count 10K *100K=1MRegards,
Xiaoxin Sheng