Forum Discussion
nic_k
2 years agoFrequent Visitor
help with optimizing DAX as visual exceeded available resources
Running into an issue where "Visual exceeded available resources" if i don't filter the data for viewing.
All data is within a single table.
This how the table looks like when filtered by Name
Here is the DAX:
Duration From Previous Task =
VAR _CurrentTaskTime =
CALCULATE ( SELECTEDVALUE ( 'task'[Created On] ) )
VAR _PreviousTaskTime =
CALCULATE (
MAX ( 'task'[Created On] ),
ALLEXCEPT ( 'task', 'task'[lead.fullname] ),
'task'[Created On] < _CurrentTaskTime
)
VAR _timeDifference =
IF (
ISBLANK ( _PreviousTaskTime ),
0,
DATEDIFF ( _PreviousTaskTime, _CurrentTaskTime,DAY )
)
RETURN
_timeDifference