Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
We've been working with Embedded for many years but only now building Mobile views.
Working in PBI desktop we are able to override the styling of elements (buttons, charts etc) in the mobile portrait view. These overrides work in powerbi service and in the powerbi mobile app, but they are completely ignored in embedded.
To be clear, we ARE getting the mobile layout (models.LayoutType.MobilePortrait), it's just that the styling overrides we set in the report are being completely ignored - legend positions, button styles, border widths, bascially everything we've tested is ignored when embedding.
For example:
The buttons in PowerBI Desktop in landcape (Master) view (top right of page):
in PowerBI Desktop in the mobile (portrait) view we shorten the text and pack these together with squared-up corners and thinner borders to create a menu 'bar' at the bottom of the page:
This works perfectly and look fine in the PowerBI mobile app:
but when embedded in our application, the are *positioned* correctly (we are embedding with models.LayoutType.MobilePortrait) but the changes to button text, border width and corner rounding are completely ignored:
Are these mobile view styling overrides not supported in embedded, and if not, why not / when will they be?
Our experience with mobile view so far has left us unimpressed. It seems we'd be better off creating a set of custom sized Master pages specifically for mobile and then just showing / hiding the relevant pages via the embed api. Are we wrong?
Thanks,
Tim
Hi @dapster105 ,
Thank you for sharing. I apologize for the inconvenience. Please pay attention to the limitations.
More details: Embedding a Power BI report with mobile layout in Power BI embedded analytics | Microsoft Learn
Mobile layout view - Power BI | Microsoft Learn
If I have misunderstood your meaning, please provide more details.
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Yes, I covered that limitation in my list of problems with mobile layouts when embedding. But as you can see there are several others, including the fact that styling overrides are completely ignored.
In case this is ever of use to someone else experiencing similar problems with mobile layout in PowerBI embedded, I'm copying below my internal summary of the Pro's and Con's and what our approach will be moving forward.
Mobile Layout pro's:
Mobile Layout con's:
There may be other con's that I can't remember from the wasted couple of days of my life but that should be enough to convince anyone whose primary concern is the best user experience in an embedded scenario. Really, if you're a PowerBI embedded developer, the ONLY case where using mobile page layouts makes any sense is where you also need your report to be accessible via PowerBI mobile app (even then I'd argue it may be unwise to try to multi-purpose like this). If you're focussed on embedded, you will always have more control to deliver a better user experience by creating a set of 'Desktop' master pages and a set of 'Mobile' master pages in the same report, then use your own application code to control which are shown and which are hidden dynamically.
We will use 16:9 ratio pages in fit-to-page for all landscape vewports, and 1:2 ratio pages in fit-to-page for portrait orientation when viewport width drops below about 570px (based on our own ux testing). Using this approach:
We encode 'fallback' instructions into the page names so they are structured a bit like:
POR/LAN#PageNumToSwitchTo#DisplayName
Each page identifies itself as Portrait or Landscape and identifies which page in the report our application should switch to if the orientation is changed. We use DisplayName for our own external navigation and display purposes.
For our needs this approach will work fine but it is disappointing that Embedded is behind the broader PowerBI feature set (or is actually broken in some cases) and does not provide the control that application developers should be able to expect. We pay a lot for our premium embed capacities and I think we should be able to expect better than our second-class citizen status!
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
37 | |
29 | |
25 | |
15 | |
14 |
User | Count |
---|---|
54 | |
31 | |
25 | |
20 | |
13 |