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
JimJim
Helper V
Helper V

Performance issues when filtering

Hi,

 

Here is the (simplified) model in my report.

 

model.PNG

 

Work Order has 179k rows

Work Order Lines has 210k rows

Every Work Order can have one or more Work Order Lines

 

I have a card which displays a simple count of rows on the Work Order table. The measure used in the card is defined as follows: COUNTROWS ('Work Order')

 

If I filter on either Location or Time the card value will display within a couple of seconds, however if I filter using both Location and Time the query runs for about 20 minutes before completing. Having analysed the query in DAX studio I can see that the query generated is:

 

DEFINE
  VAR __DS0FilterTable = 
    TREATAS({2019}, 'Date'[Year])

  VAR __DS0FilterTable2 = 
    TREATAS({"Europe North"}, 'Location'[Region])

EVALUATE
  SUMMARIZECOLUMNS(__DS0FilterTable, __DS0FilterTable2, "WOCount", IGNORE('Work Order'[WOCount]))
DEFINE

  VAR __DS0FilterTable2 = 
    TREATAS({2019}, 'Date'[Year])

  VAR __DS0FilterTable3 = 
    TREATAS({"Europe North"}, 'Location'[Region])

EVALUATE
  SUMMARIZECOLUMNS(
    __DS0FilterTable2,
    __DS0FilterTable3,
    "WOCount", IGNORE('Work Order'[WOCount])
  )

 

This is where my knowledge stops as I don't know what to do next in order to get my query running quicker. Any help you can provide would be greatly appreciated.

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @JimJim 

 

If you can merdge Work Orders and Work Order Line table in to one fact table at sorce or in Query Editor this would probobly improve your performane.


As @Anonymous  sugested the amount of columns and Unique values has a big impact as well, specialy in fact tables

 

Regards,
Mariusz

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

3 REPLIES 3
Mariusz
Community Champion
Community Champion

Hi @JimJim 

 

If you can merdge Work Orders and Work Order Line table in to one fact table at sorce or in Query Editor this would probobly improve your performane.


As @Anonymous  sugested the amount of columns and Unique values has a big impact as well, specialy in fact tables

 

Regards,
Mariusz

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

 

 

Thank you for your replies, unfortunately I can't do anything about the number of columns I am bringing in as they are all in use. The cardinality is also something I have no control over.

 

I will attempt to merge both of the main fact tables.

Anonymous
Not applicable

any chance you can load a sample of the data?  It's not so much the amount of rows to be concerned about, it's the amount of columns and the amount of unique values in those columns. 

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.