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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Bandy
Frequent Visitor

Error fetching data for this visual

Hi, 

I've a Power BI report direct query connection to SSAS Cube. I have created a measure Measure1 = DIVIDE(SUM( fact[cost]), SUM(fact[imp]))

I have kept this measure in the visual and a column from the fact table. It loads fine. As soon as I kept a visual level filter by applying Measure1 less than 10. Visual breaks.

Bandy_0-1753701818342.png

Error - doesnt have any sepcific details

Bandy_1-1753701880123.png

 

1 ACCEPTED SOLUTION

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.

View solution in original post

11 REPLIES 11
v-kpoloju-msft
Community Support
Community Support

Hi @Bandy,

Thank you for reporting this issue. Also thanks to @MasonMA, @FBergamaschi, for those inputs on this thread. Based on your description and the screenshot, the problem appears to stem from a limitation in SSAS Multidimensional (MD) when using visual-level filters on DAX measures (like) in a Power BI report with Direct Query mode. Measure1 < 10.

SSAS MD does not fully support translating such filters into MDX, which causes the query to fail and return the generic “Error fetching data for this visual.”

Recommended Workarounds:

  • Avoid using visual-level filters on the measure. Instead, use a slicer based on a disconnected table, and modify the measure to conditionally show results based on that slicer.
  • If possible, move the ratio logic into a calculated column and filter based on that.

Unfortunately, this is a known limitation with SSAS MD and Direct Query behaviour in Power BI. Migrating to SSAS Tabular or using Import mode would offer better DAX support.

Kindly refer to the below mentioned documentation links for better understanding:
Analysis Services multidimensional data in Power BI Desktop - Power BI | Microsoft Learn
Direct Query mode in Analysis Services | Microsoft Learn

Also, this is the solved thread which might be helpful to you:
Solved: Re: Error fetching data for this visual - Microsoft Fabric Community

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 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). Bandy_0-1753871100492.png 

Bandy_0-1753877981851.png

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.

Bandy_1-1753874376352.png

Bandy_2-1753874821357.png

  • But as soon as I add the measure as a filter, the visual throws an error. 

Bandy_4-1753874869271.png

Bandy_2-1753878639258.png

Use this link -  for query

Bandy_1-1753878108001.png

 

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.

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.

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. 

Bandy
Frequent Visitor

Bandy_2-1753702965484.png

 

Due to sensitive data, I need to hide the Name field. 
Here is the snip where teh measure 1 works fine until I keep the visual level filter. 

Additional Info 
Count of Name field values - 70,985,036
Distinct count of name field values - 814,938

MasonMA
Community Champion
Community Champion

Hello @Bandy 

 

According to several past posts, this could be Power BI glitches and you can try rebuilding your visuals to see if they get fixed, 

 

Or you may also try reviewing and debugging your DAX queries as Ibendlin suggested. 

 

https://community.fabric.microsoft.com/t5/Service/Error-fetching-data-for-this-visual/td-p/4142461

Bandy
Frequent Visitor

Hi Thanks for sharing the info. 
I tried rebuilding the measure as well as new visual - same error happens. 
I will try
1. Create separate table = VAUES(name)
2. Create relationship with Fact[name]
3. Use that field in the visual. 

MasonMA
Community Champion
Community Champion

You are using DirectQuery on SSAS Tabular with 71 million rows in the Name column and 815k distinct values, which sounds more like a resource and query translation bottleneck. 

In your case, would it be more reasonable to try ways that avoid pushing a complex filter into the underlying query? such as 

applying a visual-level filter like

 

IF(
DIVIDE(SUM(fact[cost]), SUM(fact[imp])) < 10,
1,
0
)

 

Bandy
Frequent Visitor

Thanks MasonMA. 
tried your approach, applying visual filter using IF() also shows same error. 
I'm currently checking the v-kpoloju-msft comment. Will let you know if I found the solution

FBergamaschi
Solution Sage
Solution Sage

Can you please show the image of the measure 1 working fine?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors