Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have an app made in Flask where I embed the power bi reports. These reports are in desktop view design and I would like to make a report in mobile view. The ideal would be to make the report in mobile and desktop view and it will detect where you are viewing it and thus show you the corresponding one.
What I don't know is to first embed the mobile view.
Would anyone know how to do it within a Flask app?
thank you.
Has anyone managed to embed a Powerbi report (previously created the mobile design view and uploaded to the Power Bi work area) in an external Powerbi application (example in python) and have the mobile design displayed? I can't believe that there is only the mobile view from the official Powerbi application.
I will review what you say.
In reference to the javascript code, I have already tested it on localhost from my PC, adding this part to the code but it doesn't do anything, I don't know if it detects desktop so it no longer shows the mobile layout, is that right?...
On the other hand, if the mobile design is for the power bi app, how should I do it if I have my own app in python? Basically what I want is to show the mobile or desktop design depending on which device I connect from.
var embedConfiguration = {
type: 'report',
id: reportId,
embedUrl: embedUrl,
tokenType: tokenType,
accessToken: accessToken,
settings: {
layoutType: models.LayoutType.MobilePortrait
}
};
HI @apenaranda,
You can take a look at the following link about the similar requirement:
powerbi - Embed power bi dashboard into Flask Application - Stack Overflow
It is possible dynamic switch between report layout and mobile layout. You can add JavaScript function to verify the requests(e.g. UA) to get device type, then you can dynamic switch the embed configurations layout part.
Embedding a Power BI report with mobile layout in Power BI embedded analytics | Microsoft Learn
BTW, current the mobile layout are worked for power bi mobile app, it not suitable when directly access from mobile device.
About mobile-optimized Power BI reports - Power BI | Microsoft Learn
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
2 | |
1 | |
1 | |
1 |