Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Martine2607
Advocate I
Advocate I

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.
Martine2607_3-1673948577147.png
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:
Martine2607_1-1673947926515.jpeg
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:
Martine2607_2-1673947926516.jpeg
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 2
Martine2607
Advocate I
Advocate I

Thanks Yolo, No we use filters on this page. 

v-xinruzhu-msft
Community Support
Community Support

Hi @Martine2607 

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. 

vxinruzhumsft_0-1674004939014.png

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.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.