Forum Discussion

brian0782's avatar
brian0782
Helper II
4 years ago
Solved

DAX filter performance issue

Hi   This is related to https://community.powerbi.com/t5/Desktop/Filter-table-based-on-less-than-and-greater-than-date-value/m-p/2270598#M824679   This has been impemented but I'm experiencing pe...
  • bcdobbs's avatar
    bcdobbs
    4 years ago

    I'd consider expanding the table with the dates so you have a row per day for each item:

    Have a look at:

    Date Expansion 

     

    It takes a basic table with From and To dates and then in power query:

     

    1) Adds a Number of Days custom column:

    Number.From( [Date To] - [Date From] ) + 1

     

    2) Sets it's data type as whole number.

     

    3) Adds a custom column to contain a list of dates:

    List.Dates([Date From], [Number of Days], #duration(1, 0, 0, 0))

    4) Expands the list to new rows.

    5) Removed other columns.

    6) Set date column as a date.

     

    I think you can use this to massively increase the speed of the filter on that table.

     

    If you're then still having performance issues the only other thing I can think is to move the filter directly in DAX by getting VALUES ( 'Binding Authority'[UMR] ) and using TREATAS within calculate to move it directly over to your big table.