
Announcements
Hello;
I have a PowerApps application and I would like to make a Power Bi graph in this application.
In my application I have a SharePoint list containing homeworking requests by user.
In my application, the user can only see his requests because I have a condition that test on the name of the user and the account with which he is connected. ==> Property Visible => [IF Requester.Email = User().Email;]
I would like to have graph by user that when he clicks a button he obtains this graph :
A graph wih on one axis the number of "homeworking days"/month and on the other axis (the months of the year) ?
The Status for the request must be approved to add day on graph (chart bars)
For exemple : Result for Person "XYZ" => 4 days on April, 3 days on September,...
1) How is it possible to make this graph ? Send list information with Power Flows to Power Bi ?
2) How with the information is it possible to realize this graph ?
The List SharePoint :
Thanks for your help ! 🙂
Hi @Anonymous ,
Could you please share a bit more about your scenario?
Do you want to embed a Power BI report into your app?
If you want to embed a Power BI report into your app, you need to create a report within your Power BI based on your SP List data source firstly, then pin the Report to a specific dashboard.
After that, within your app, add a Power BI tile control, then specify the workspace, dashboard and Tile from your Power BI, then the report would be displayed in your app.
Please check the following article for more details:
https://powerapps.microsoft.com/en-us/blog/power-bi-tile-in-powerapps/
https://www.inogic.com/blog/2019/09/integrating-powerapps-and-power-bi-to-build-multifaceted-apps/
In addition, I think it is not necessary to embed a Power BI report into your PowerApps app, instead, I think the Chart Graph controls (e.g. Column Chart, Line Chart, Pie Chart) within PowerApps could achieve your needs.
I have made a test on my side, please take a try with the following workaround:
Add a Column chart control within your app, set the Items property of the Column chart to following:
AddColumns(
GroupBy(
AddColumns(
Filter('Home Working Test', Requester.Email = User().Email && Status_Request.Value = "Approved"), /* <-- I think the Status_Request is a Choice column in your SP list */
"MonthOfYear",
Text(Date_For_Home_Working_Test, "mmmm")
),
"MonthOfYear",
"GroupData"
),
"Homeworking Days",
CountRows(GroupData)
)
Then set the Labels property within the Column chart to following:
MonthOfYear
set the Series property within the Column chart to following:
'Homeworking Days'
In addition, if you want to control above Column chart control visible through a Button, please consider take a try with the following workaround:
Add a button control, set the OnSelect property to following:
UpdateContext({ShowChart: !ShowChart})
set the Visible property of the CompositeColumnChart1 (which is a Group control, contains the Column chart control) to following:
ShowChart
Please consider take a try with above solution, check if the issue is solved.
Best regards,