Forum Discussion
DAX help needed - inherited code timing out
List of thoughts...
If you drop the measure into a very simple card visual does it process?
In PowerQuery if you put a filter on to reduce data volume (eg limit it to previous 2 years) does the visual render? If so can you send a screen shot of what the visual is.
Other things to look at:
Remove large chunks of the switch statement (or comment out the chunks and have it return a static value). To try and narrow down a particular aspect of the query. (Nothing jumps out).
I'd normally paste the query for the visual into dax studio and have a look at it's execution in there.
Lastly I wondered if you could split the measure out into a calculation group and use that to dynamically change the measure rather than a switch statement. I think doing it that way would remove the full execution that I assume is currently happening.
The visual always renders in PowerBI desktop and occasionally renders in the service as well.
May have to try the pre-aggregation route.