Forum Discussion
FILTER Performance in Composite Model with Aggs Very Slow
Anonymous
Try perhaps using only the relevant column instead of the whole table as base for the filter:
CALCULATE (
SUM ( 'Sales Ticket'[Ticket_Count] ),
FILTER (
ALL('Sales Agg Date Store'[Sales Above Threshold Flag]),
'Sales Agg Date Store'[Sales Above Threshold Flag]
)
)
or
CALCULATE (
SUM ( 'Sales Ticket'[Ticket_Count] ),
FILTER (
DISTINCT('Sales Agg Date Store'[Sales Above Threshold Flag]),
'Sales Agg Date Store'[Sales Above Threshold Flag]
)
)
which would be actually be the equivalent of what you had (since you were not using ALL on the whole table)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Thanks again for taking a look. I really appreciate it! The proposed DAX didn't work. I think I just am better off propagating the filter column throughout all levels of my aggregation. So I added it in the source for all 3 fact tables, now I can just write it real easy like this...
"Ticket_Count_Above_Threshold", CALCULATE ( [Ticket Count], 'Sales Ticket'[Sales Above Threshold Flag] )... and the aggregation magic in Power BI rolls it up as much as possible. Amazing stuff.