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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
DanielW
New Member

SWITCH now conflicting with chart analytics functions

Hi

 

I have an established report with a line viz that uses a switched KPI with percentile analytics across a time range. Since last week, the analytics have started breaking the viz with this error displayed to the user:

 

"Error fetching data for this visual

Couldn't retrieve the data for this visual. Please try again later."

 

And this in the desktop app:

 

"ProjectionReferencedIndices does not contain DataShapeBindingAggregate.Select"

 

When I remove the analytics, the chart displays fine. If I don't use a KPI with the SWITCH command I don't get the same problem, even where the switch selection refers to the same KPI. The same KPI works with the time series arranged year on year in parallel rather than in series. Nothing has changed in the report between it working and not working.

 

Has something changed in the software relating to the interaction between SWITCH and chart analytics in the last few days that would affect this? Any idea how to fix it without removing the percentiles or the SWITCH command?

 

I have tried reloading the data, but to no avail.

 

Thanks

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @DanielW -The issue you're encountering is likely due to an interaction between the switch function and percentile analytics, potentially exacerbated by recent Power BI updates. Simplifying the switch statement, removing and reapplying analytics, and ensuring your software is up to date are good first steps.Try removing the analytics, saving the report, and then reapplying the analytics. Sometimes, this can clear up issues related to corrupted or problematic configurations.

As a temporary workaround, if the KPI without the switch statement works fine, you might consider creating multiple visuals with different KPIs and using bookmarks or dynamic visuals to switch between them instead of using a switch statement within a single visual.

SWITCH function (DAX) - DAX | Microsoft Learn

 

Hope the above information helps you.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @DanielW ,

 

Thanks rajendraongole1 for the quick reply. Please allow me to suggest other ideas:
You mentioned that the SWITCH function gives you some hindrance then could you use the IF function instead? Sometimes nested IF and SWITCH can serve the same purpose.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

rajendraongole1
Super User
Super User

Hi @DanielW -The issue you're encountering is likely due to an interaction between the switch function and percentile analytics, potentially exacerbated by recent Power BI updates. Simplifying the switch statement, removing and reapplying analytics, and ensuring your software is up to date are good first steps.Try removing the analytics, saving the report, and then reapplying the analytics. Sometimes, this can clear up issues related to corrupted or problematic configurations.

As a temporary workaround, if the KPI without the switch statement works fine, you might consider creating multiple visuals with different KPIs and using bookmarks or dynamic visuals to switch between them instead of using a switch statement within a single visual.

SWITCH function (DAX) - DAX | Microsoft Learn

 

Hope the above information helps you.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





I tried most of these things but didn't get them working with the analytics yet. I'll keep trying. It seems to only be a problem in certain circumstances, so I'll dig into those areas where it is working ok.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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