Forum Discussion
Anonymous
3 years agoNot applicable
Switch function performance & slicers strange behavior + workaround
Our situation is that for each page we have a specific measure, unit and legend that needs to be used in the chart on that page. For this we used a page wide filter and three switch functions. When selecting the page in the page wide filter, the table is filtered such that there is also only one measure, unit and legend selected.
However we noticed that the switch function was calculating all the measures. The workaround we found was adding a (hidden) slicer on the page with the the specific columns (measure, legend, unit) used in the switch functions. Even though there is only one selection possible because of the page wide filter. So the slicer looked like this:
Since then we have been adding many pages to the report (and many new measures to the switch function) and we were having performance issues again. I now found out that selecting the slicer like this does not work:
Instead of about 2 seconds to load a chart it would take almost a minute.
In the first way I select the bottom one (A_Volumes Multipliers table) directly and it makes the top two selected grey automatically. In the second way I select the top one (Value measure demand dynamic) and it makes the bottom two selected black automatically.
I never realized there is a difference between these two ways, and I wanted to share this finding with the rest of the Power BI community. Maybe there are more people who can benefit from this workaround to increase the SWITCH performance. And also very interested to hear if there is somebody who understands this, to me very strange, behavior 🙂
2 Replies
- AnonymousNot applicable
Hi Anonymous
Did you use the "Filter on all pages", if you use this, all pages wil be affected by your filter, and you should put the filter to "Filters on this page", and each page need to set it.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Thanks Yolo, No we use filters on this page.