Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Paul_Martin
Advocate I
Advocate I

Local Data Sources With An AppSource App

I am looking to deliver a Power BI App and distribute to the public via AppSource, but it needs to take data from local data files supplied from a user's PC.

 

Is this possible and what are the steps ?

 

Can I paramaterise certain aspects like :

 

Local Directory For Your Files                                   C:\MyData

Local FileName                                                         Fred.xlsx


Any help really appreciated

 

Paul

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Paul_Martin ,

Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
v-shex-msft
Community Support
Community Support

HI @Paul_Martin,

Did you mean the design a app with parameters? If that is the case, I'd like to suggest you check the official document to know more about template apps:

Create template apps in Power BI - Power BI | Microsoft Learn
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
AltaMagic
Regular Visitor

Delivering a Power BI App via AppSource that takes data from local data files on a user's PC is not directly supported due to the nature of Power BI's cloud-based architecture. However, you can achieve a similar outcome by guiding users to set up a local data gateway and parameterizing the data source in Power BI Desktop.

  1. Create Parameters:

    • Go to the "Home" tab and click on "Manage Parameters" > "New Parameter."
    • Create parameters for the local directory and file name.
      • Example:
        • Parameter Name: LocalDirectory
        • Data Type: Text
        • Current Value: C:/MyData
        • Parameter Name: FileName
        • Data Type: Text
        • Current Value: Fred.xlsx
  2. Use Parameters in Data Source:
    • Go to "Home" > "Transform Data" to open the Power Query Editor.
    • Click on "New Source" > "File" > "Excel" (or the appropriate file type)
    • In the filepath use the parameters you created:
let
    Source = Excel.Workbook(File.Contents(LocalDirectory & "\" & FileName), null, true)
in
    Source
  1. Load Data and Create Report:

    • Load the data and create your report as usual.

Step 2: Publish the Report to Power BI Service

  1. Publish the Report:
    • Save and publish the report to your Power BI workspace.

Step 3: Set Up a Data Gateway

  1. Install and Configure Data Gateway:

  2. Map Data Source to Gateway:

    • In the Power BI Service, go to the workspace where the report is published.
    • Go to "Settings" > "Datasets" > "Gateway connection."
    • Map the dataset to the configured data gateway and ensure the data source settings match the local file paths.

Step 4: Distribute the App via AppSource

  1. Create and Publish the App:
    • Create an app in the Power BI Service that includes your report.
    • Publish the app to AppSource

 

@AltaMagic 

Thank you so much for spending the time to answer my two questions so fully.

Given your comments on loading data from a local file with Parameters would ultimately require a Personal Gateway (not realistic, cos the App is aimed at end users and setting up a gateway is just too techy in this scenario), could we :

 

  • Use parameters to load in data from an Excel workbook stored on OneDrive
  • The workbook itself (supplied by us) requires vba macros, so as long as the user used Excel 365 Desktop with the workbook stored on Onedrive I think we'd get the benefit of both worlds here

Could you just confirm, if my thoughts are correct ?

So the ultimate process as I see it would be :

  • Download the basic XLSX workbook from our website
    • Save to your Onedrive
    • Enter data required for the Power BI app and save
  • Install our Power BI App from AppSource
    • Installs in the Customer's tenant
  • Use parameters to specify the OneDrive Excel workbook to poulate the Power BI Model
    • Then have a fully populated Power BI Model
  • Develop customer Power BI dashboards based on our Dataset
  • Develop Pivot Tables from Analyse in Excel on our Dataset
    • If we were to provide prepackaged Pivot Tables, how would we make the ODC file editable per customer to point to the correct Power BI tenant ?

Sorry a lot there, but feel I am getting close !

Helpful resources

Announcements