Forum Discussion
zazaalaza
2 years agoFrequent Visitor
DAX too Slow with Filtering
Hi, I have the following measure: Measure =
CALCULATE (
COUNT ( 'Table'[Value] ),
FILTER (
ALL ( 'Table' ),
'Table'[ValidFromDate] < MAX ( 'Date'[D...
zazaalaza
2 years agoFrequent Visitor
Perhaps there is a way to make it faster without using Calculate? Greg_Deckler Any ideas?
- AlexisOlson2 years ago
Super User
Yeah, I have seen this pattern be slow occasionally.
Without CALCULATE can be written fairly similarly.Measure = VAR _MaxDate = MAX ( 'Date'[Date] ) RETURN COUNTROWS ( FILTER ( ALL ( 'Table' ), 'Table'[ValidFromDate] < _MaxDate && 'Table'[ValidToDate] > _MaxDate ) )