Forum Discussion

vseimas's avatar
vseimas
Frequent Visitor
3 months ago

Embedding a Power App in PowerBI issue - data not moving over

I am unsure if my issue is with PowerApps or PowerBI but I suspect it might be a data connection issue so am coming here.

 

I have created a PowerApp that I want to embed in PowerBI.  I am trying to get the ID number to pass over to the app for a tracking form when a row on a PowerBI matrix visualization is chosen.

 

I was able to get the PowerApp into PowerBI and when using a CountRows formula on the App, could see the number change from 1000 to 1 when a record was chosen but no data was being passed.  I added a JSON record in the PowerApp to see what was being passed - nothing.  I added a calculated column in my PowerBI dataset to see if that would pass through - no.  

 

I updated my column from Whole Number to Text to see if that would fix it but it didn't.  I created the app in the PowerApp visualizer instead of using an already created one but that didn't work.  I tried using a blank app to see if any of the set-up in my app (which I changed around A LOT) made a difference but neither version could get data passed to it.  The PowerBI integration exists on my layers tab in PowerApp so some kind of connection is established but I can't do anything with it.

 

I feel like there is probably some setting / box  / hidden thing that I'm missing to get the two products to data sync but I can't figure out what it is.  AI told me to check that the products are in the same environment / region and they are.

 

I've watched a few videos on how to set this up and according to them, everything looks good.  The matrix visualization in PowerBI does have 7319 rows and I know that there is a throttling issue with PowerAutomate but I haven't seen anything about that with these products since I am using First in my code for PowerApp so even if there is a throttling issue, I am only trying to bring over the first instance.  Some data appearing should occur.

 

​​​​​​​Any suggestions of things to check would be really helpful. 

16 Replies

  • Sounds like the column you want to access isn't actually being exposed to the app. The Power Apps visual has its own "Power Apps data" field well in the Fields pane, separate from your matrix. Cross-filtering from the matrix narrows down the row, which is why CountRows changes from 1000 to 1, but only fields you explicitly drag into the Power Apps visual's data bucket are added to the schema of PowerBIIntegration.Data.

    Open the Power Apps visual on the report, look at its Fields pane on the right, and make sure your ID column is added there. Then inside the app, reference it as First(PowerBIIntegration.Data).IDColumnName using the exact name shown in the bucket. After changing the fields on the visual, edit the app from the visual, save, and republish so the app picks up the updated schema.

     

    If that resolves it, please mark it as the accepted solution and give a thumbs up.

     

    Thanks,
    Shai Karmani

     

    Let's connect in LinkedIn

    • vseimas's avatar
      vseimas
      Frequent Visitor

      I am using the power wells and referencing the fields exactly as they are.  Still not coming through, sadly.

  • vseimas's avatar
    vseimas
    Frequent Visitor

    The correct field is in the PowerApps Field pane and I am referencing the data as First(PowerBIIntegration.Data).IDColumnName exactly as it appears in the Field pane.  

    I changed the visualization to a matrix to verify that the filtering is working and it is - but it just won't reference the data from the row on the app.  It will filter / count it, but it won't pass the actual data over for use.

  • Hi vseimas,

     

    Recommended Step-by-Step Reset

    Publish your .pbix to Power BI Service (app.powerbi.com)

    Open the report in edit mode in the browser (not Desktop)

    Add the Power Apps visual from the Visualizations pane

    Drag your ID column explicitly into the Power Apps visual's field well

    Click "Create new app" from within that visual (do not connect an existing app initially)

    In Power Apps Studio, add a temporary Gallery → set its Items to PowerBIIntegration.Data

    Verify that your ID field appears in the gallery

    Build your form using First(PowerBIIntegration.Data).YourIDColumn

    Save and publish the Power App

    Test in Power BI Service, not Desktop, most of the time, apps opened with the Desktop version do not show data passed through Power BI.

    • vseimas's avatar
      vseimas
      Frequent Visitor

      Hmmm, I have already tried this but the new app I built wasn't a Gallery.  The app I'm using originally had a gallery but I only want new entries not old ones so you can't SEE the gallery.  Is the field stuck somewhere in that gallery that I got rid of?  

      I will try again but we have been viewing it in Service, not Desktop since we heard about the limitations.

       

      • oussamahaimoud's avatar
        oussamahaimoud
        Icon for Memorable Member rankMemorable Member

        Ok! I recommand to try this :

         

        Re-add a gallery temporarily inside your existing app

        Set its Items property to PowerBIIntegration.Data

        Go back to Power BI Service, select a row in your matrix, and verify your ID field actually appears in the gallery

        Once confirmed working, you don't have to delete the gallery, instead, just hide it by setting its Visible property to false

        This is actually the cleaner approach for your use case. A hidden gallery keeps the data bridge alive without showing old records to users, while your form still handles new entries only.

  • Hello vseimas,
    This usually isn’t a broken connection between Power BI and Power Apps.
    What typically causes this is that the Power Apps visual isn’t actually getting any fields from the report. In Power BI, Power Apps only works with whatever you drop into the visual’s Fields well. If that part is empty, PowerBIIntegration.Data will still exist, but it comes through empty, which matches what you’re seeing with CountRows changing but JSON returning nothing.
    The fix is straightforward: go into Power BI Desktop, click the Power Apps visual, and make sure the ID (or whatever key you need) is added into the Fields section. Once that’s done, you’ll be able to access it inside Power Apps using First(PowerBIIntegration.Data).ID.
    One thing that often gets missed, clicking a matrix row doesn’t directly pass anything into the app. The Power Apps visual is the actual data bridge, and only what’s placed inside it gets sent across.
    Docs: 
    Power Apps visual for Power BI 

    • vseimas's avatar
      vseimas
      Frequent Visitor

      My field is and always has been in the Fields well.  It is there but I just can't get the First(PowerBIIntegration.Data).ID to actually show as the default in the App where I want it to go.

      • Olufemi7's avatar
        Olufemi7
        Icon for Super User rankSuper User

        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.

  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    Hi vseimas ,

    We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.


    oussamahaimoud , Olufemi7 ,& Shai_Karmani ,Thanks for your prompt response

     

     

    Thank you for your patience and look forward to hearing from you.
    Best Regards,
    Prashanth Are
    MS Fabric community support

    • vseimas's avatar
      vseimas
      Frequent Visitor

      None of the suggestions have worked so far but I am going to try double check the gallery build when I return from vacation.