Forum Discussion
Error fetching data for this visual
- 1 year ago
Hi Bandy,
Thanks for the update and the detailed diagnostics.You are right this behaviour stems from how Power BI translates visual-level filters on measures (like [CPM] < 10) into queries for the SSAS engine. When string columns (like CampaignName) contain non-ASCII characters, this can sometimes lead to query parsing or encoding issues, particularly in MDX/DMX back-end processing.
To workaround this issue, here are a few suggestions: Avoid using visual-level filters on calculated measures directly when dealing with non-ASCII text. Instead, incorporate the filter logic within your measure, below mentioned measure:
Filtered CPM = IF ( [CPM] < 10, SELECTEDMEASURE() )and use this measure in the visual without adding a visual-level filter.
Alternatively, replace the hardcoded threshold with a disconnected parameter table so you can control the filtering via slicer selection, without triggering internal query issues. If you are using Import mode and have control over the model, you could also pre-calculate flags like IsLowCPM in a column and filter based on that instead of a measure.
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Fabric Community Forum.
Thanks a lot v-kpoloju-msft for the guide and workarounds.
I applied your first approach using a calculation group, and it worked — but the table total values are incorrect (expected total calculation behaves differently in Power BI).
I'll later fetch the value from a disconnected table and replace the hardcoded 10.
Upon further testing, I noticed that the column CampaignName contains non-ASCII characters. As a test, I filtered one of the campaign names to:
use this link to see (unable to paste here)
I connected SQL Server Profiler to the SSAS Cube and monitored the queries Power BI sends.
- When there is no visual-level filter using a measure (like CPM = SUM(Cost) / SUM(Impressions) < 10), the visual displays fine.
- But as soon as I add the measure as a filter, the visual throws an error.
Use this link - for query
From the SSAS Profiler, the error seems to be related to invalid characters.
I don't understand, Why does Power BI render the visual correctly when no filter is applied, but throws an error due to invalid characters only when a measure filter is added?
Hi Bandy,
Thanks for the update and the detailed diagnostics.
You are right this behaviour stems from how Power BI translates visual-level filters on measures (like [CPM] < 10) into queries for the SSAS engine. When string columns (like CampaignName) contain non-ASCII characters, this can sometimes lead to query parsing or encoding issues, particularly in MDX/DMX back-end processing.
To workaround this issue, here are a few suggestions: Avoid using visual-level filters on calculated measures directly when dealing with non-ASCII text. Instead, incorporate the filter logic within your measure, below mentioned measure:
Filtered CPM = IF ( [CPM] < 10, SELECTEDMEASURE() )
and use this measure in the visual without adding a visual-level filter.
Alternatively, replace the hardcoded threshold with a disconnected parameter table so you can control the filtering via slicer selection, without triggering internal query issues. If you are using Import mode and have control over the model, you could also pre-calculate flags like IsLowCPM in a column and filter based on that instead of a measure.
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Fabric Community Forum.
- v-kpoloju-msft1 year agoCommunity Support
Hi Bandy,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.Thank you.
- Bandy1 year agoFrequent Visitor
Thank you v-kpoloju-msft 🫡 .
I've implemented your workaround using calculation group it works well but slightly slow as IF case should be executed for each row in the table.
Also Non Ascii issue only happens in Power BI service not in the Power BI desktop. Not sure how the compute engine is different b/w local desktop & Service.