Forum Discussion
Embedding a Power App in PowerBI issue - data not moving over
Hello vseimas,
Since CountRows(PowerBIIntegration.Data) drops from 1000 to 1, Power BI is at least filtering the app correctly, so the connection itself seems okay.
At this stage, Please check whether the matrix is passing grouped context instead of the actual row value.
A good test is to temporarily switch the matrix to a simple table visual with just the ID field and see if:
First(PowerBIIntegration.Data).ID starts returning data.
You can also add a label in Power Apps with:
JSON(First(PowerBIIntegration.Data), JSONFormat.IndentFour) to see exactly what is arriving from Power BI.
If the control you are populating is a text input, try setting its Default property to:
Text(First(PowerBIIntegration.Data).ID)
Sometimes the issue is simply the field name or datatype being interpreted differently inside Power Apps.
I added that JSON tag, it is {} when records get clicked.
The ID being used got changed to text and I used the TEXT() in the default property OF THE Field and nothing came through.
The deafult of the Card is ThisItem.Stu_Id - could this be causing the issue. Since the app has a hidden gallery, I got it to work in a previous version not in PowerBI by searching records and setting the varStudent with a button click. I was trying to set a varStudent origially as the powerBI integration but then turned to trying to just set the field as default to powerbi integration instead of the intermediate step of varStudent (since searching and choosing an option is something that clicking on the row in the matrix should take care of.