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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
zycc_zycc
New Member

About PowerBIReportEmbed for Powerbi client vue js

当我使用演示代码加载报表时,我使用切片器设置了过滤器的默认值,然后我发现了一个问题:当为切片器设置默认值 a 时,它显示全部,但报表中的数据是在 a 之后过滤的;当我设置两个或多个切片器时,我设置的默认值将显示在每个切片器上,并且报告中的数据将被筛选。我还使用 'report.reload()' 再次重新加载它,但发现它无法正常工作。

 

如果有人有建议或知道如何解决这个问题,我将非常感谢您的帮助。

谢谢!

4 REPLIES 4
v-jtian-msft
Community Support
Community Support

Hi,@zycc_zycc .I am glad to help you.
Unfortunately, due to the working environment, I am unable to repeat your question. I hope my suggestions below are helpful
I noticed that the documentation you provided mentioned setting the default values of the slicer, please check if you have successfully set them.

Use slicers in Power BI embedded analytics | Microsoft Learn


vjtianmsft_0-1737093697614.png

The limitations:

vjtianmsft_1-1737093720037.png

For reloading the report  :report.reload() , maybe you could try report.updatesettings ()

Update report settings at runtime in Power BI embedded analytics | Microsoft Learn

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, thank you for your reply.
I looked at my code and found that I added a paragraph where, during 'pageChange', I set an array with only one option for this slicer. After loading is complete, the slicer displays the default values I set, and when using the slicer, only this option can be selected. And I also found an issue where the default value settings sometimes fail when I have a selector/time slicer in my slicer. Can you tell me the reason for this? Thank you.

 

Hi,@zycc_zycc .Thank you for your reply.
Unfortunately, I can not reproduce your question due to circumstances. It does look strange from the runtime results (the date slicer is causing an indirect failure in code execution) You could try creating a support ticket for more help.

You can create a support ticket for  free and a dedicated Microsoft engineer will come to solve the problem  for you.
It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.
 

The Link of Power BI Support:

Microsoft Fabric Support and Status | Microsoft Fabric

vjtianmsft_0-1737425605964.png

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian

Thank you.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Kudoed Authors