Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Downloading Data through Power Automate

Can someone tell me the following:

Requirement: I have to include an export data button for the client.


The export data button in the ellipsis is something they dont like.
Can i use power automate to export the data underlying the graph in an xlsx/csv format.

I have the report hosted on web through the embedded license. Is it possible for users who are viewing the report via the service principal feature can download the data?

  • Hi Anonymous 

     

    This is what I've did for this usecase

     

    First step,

    You have to run a query against dataset, to get the query you need

    Open Power BI Desktop, create a table with all the fields you need

    Then go in optimize Performance analyzer; in the pane click on Start recording and refesh visual and copy query

     

    (You can remove the total of the table before to refresh visual)

     

    Then in Power Automate, you paste the code in a run query against dataset (you have to select your workspace and your dataset)

     

    Then in Power automate you add a select from Power Automate

    the tricky part is to make the mapping, to do that, you have to use the following formula instead of entry value

    item()?['[your fieldname]']

    Once you will save, the formula should appear as a power bi item

     

    Then create a csv table using the output of the previous step

    And then use an action to publish this csv on a sharepoint site or a public place (like a blob storage with a public access)

    In my case, I used an amazon S3 Bucket

     

    For the refresh, you have to schedule your dataflow at the frequency you need

     

    Do not hesistate to ask if you need more help 🙂

14 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello Idrishshatila,

      Thank you for replying and sharing the youtube contents. They were very Insightful.

  • Hi Anonymous 

     

    This is what I've did for this usecase

     

    First step,

    You have to run a query against dataset, to get the query you need

    Open Power BI Desktop, create a table with all the fields you need

    Then go in optimize Performance analyzer; in the pane click on Start recording and refesh visual and copy query

     

    (You can remove the total of the table before to refresh visual)

     

    Then in Power Automate, you paste the code in a run query against dataset (you have to select your workspace and your dataset)

     

    Then in Power automate you add a select from Power Automate

    the tricky part is to make the mapping, to do that, you have to use the following formula instead of entry value

    item()?['[your fieldname]']

    Once you will save, the formula should appear as a power bi item

     

    Then create a csv table using the output of the previous step

    And then use an action to publish this csv on a sharepoint site or a public place (like a blob storage with a public access)

    In my case, I used an amazon S3 Bucket

     

    For the refresh, you have to schedule your dataflow at the frequency you need

     

    Do not hesistate to ask if you need more help 🙂

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you so much. I will try this and let you know soon..But thank you again for taking your time to write this procedure.

      • v-menakakota's avatar
        v-menakakota
        Community Support

        Hi Anonymous ,

        I wanted to check if you had the opportunity to review the information provided by Cookistador . Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

        Thank you

  • Anonymous's avatar
    Anonymous
    Not applicable

    I made few advancements with "Export Button" in Power Automate. I have created the flow for exporting data from my Power BI report to excel csv file via email.

    I have this report published in a workpsace with embedded License that is hosted on web. For the users who login the portal to view the report on web have a login Id but use Service Principal. i.e. they may not have a Power BI licence. 
    I want that when anyone clicks the "Export data" from the report hosted on the web, they should be able to get the csv file in their email (equivalent to the one they use for logging in). In Power Automate Flow, I am using the following step:
    Send an Email (V2)
    To: User Email (Selected from Dynamic Content Window)
    Is it possible for any user who has logged in to the web portal and triggers the button to get the data in their email id through this POwer Automate Flow. Or I have to change something here?

    Please let me know. Thank you


    Also, I referred to this link for creating my workflow:
    https://www.youtube.com/watch?v=IZnWaYbbBMI&ab_channel=HOGOLYTICS




     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Is this the right forum to ask about Power Automate?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Yes Cookistador, I would love to achieve this one below:

    I click the excel icon and I can download the data. Any idea how I should replicate this?

    Thank you for this

    • Cookistador's avatar
      Cookistador
      Super User

      I was in charge of this implelentation 

      I post you a guide later 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Please let me know if I can look at any videos/articles that will help me with this. I will really wait for you guide. Thanks a lot for showing me that this is even possible Cookistador