Forum Discussion

bbAD's avatar
bbAD
Frequent Visitor
1 year ago
Solved

Power Apps for Power BI Visuals

Is there a way to export data from a Power Apps for PBI visual? I would like to export the data that I can see the app displaying in my Power BI report. Currently, when attempting to export using the...
  • lbendlin's avatar
    lbendlin
    1 year ago

    You can export the data that is in the Values columns of that visual at that moment in time.  You cannot export data from inside the PowerApp visual.

     

    If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com

  • Anonymous's avatar
    Anonymous
    1 year ago

    Step 1 is to connect connect your Power BI visual to a Power App. That can be done either by creating a new one or by connecting to an existing one. The link I shared for Shane Young tells you how to do that. Once that is done you can see up your Power App however you need to in order to visual your data. If your intent is to see the data as it is filtered in a table like format, I would use a gallery.

     

    For steps 2 and 3 you can look here for a good tutorial.

    Power Apps Export To Excel As A CSV File – Matthew Devaney

     

    Step 2 is to prepare your data for export. This is done by using the OnSelect attribute of your button. The best format to do this is JSON. Here is an example set.

    Set(
       varJson,
       JSON(
          ForAll(
             Gallery1.AllItems,
             {
                json attribute 1: gallery value 1,
                json attribute 2: gallery value 2,
                json attribute 3: gallery value 3,
                and so forth
             }
          ),
          JSONFORM.Compact
       )
    );
       

     

    Step 3. Prepare your dataflow. See link above.

    Step 4. Launch your dataflow using your button with 

    Launch(Export2CSV.Run(varJSON).link)

    The link attribute at the end there runs your data flow and gives you the link to the file. If it all works correctly a dialogue box will pop up with the link to the file you just created in your SharePoint.

     

    Please let me know if you have any issues with this and I will try to help you through the process more. The two links I gave you should give you all the information you need though.