Skip to main content
Microsoft Idea

Power BI

Needs Votes

PBIdesktop.exe

Vote (36) Share
's profile image

on 02 Sep 2016 14:44:24

Make it possible to pass parameters in on the command line in addition to the pbix filename. This would allow desktop applications to open a specific pbit/pbix and set, for example, a parameter that is used in the datasource. eg:

PBIDesktop.exe MyReport.pbix MyReportTemplate.pbix MyCustomParameter=one MyOtherCustomParameter=two

Comments (6)
's profile image Profile Picture

Jitendra Pandey on 06 Jul 2020 00:18:17

RE: PBIdesktop.exe

This is a very basic thing that is missing in Power BI Desktop executable. This MUST be included.

's profile image Profile Picture

Power BI User on 05 Jul 2020 23:17:28

RE: PBIdesktop.exe

so when is this going to be possible? this is way overdue...

's profile image Profile Picture

Chrissy LeMaire on 05 Jul 2020 23:09:41

RE: PBIdesktop.exe

Thanks so much Mike Diehl, thats what i was looking for!

's profile image Profile Picture

Josh Street on 05 Jul 2020 22:41:30

RE: PBIdesktop.exe

We would love a parameter that forced a refresh on the loaded report.

's profile image Profile Picture

Power BI User on 05 Jul 2020 22:39:13

RE: PBIdesktop.exe

It would be very useful if command-line parameters can work with PBIT, i.e. Parameter support in Power BI Template. Many automation scenarios requires invoke pbix dynamically with parameters during runtime.

's profile image Profile Picture

Mike Diehl on 05 Jul 2020 22:32:32

RE: PBIdesktop.exe

Did you intend to give a pbit file as one of those parameters? That is the use case I would like to see - I have a "build" process that involves creating several new pbix files from the same pbit, and giving different parameter values for each of them, saving them, and publishing them to a group workspace.

Step 1: (create the template)
c:\> pbidesktop.exe -source MyProjectGold.pbix -output MyProject.pbit -p:BuildDate="2016-10-18" -p:Revision=1
Step 2: (create instances from the template)
c:\> pbidesktop.exe -source MyProject.pbit -output Group1.pbix -p:Servername=MyServer.database.windows.net -p:DbName=Group1_datamart
c:\> pbidesktop.exe -source MyProject.pbit -output Group2.pbix -p:Servername=MyServer.database.windows.net -p:DbName=Group2_datamart
c:\> pbidesktop.exe -source MyProject.pbit -output Group3.pbix -p:Servername=MyServer.database.windows.net -p:DbName=Group3_datamart
Step 3: (publish)
c:\> pbidesktop.exe -source group1.pbix -publish https://app.powerbi.com/groups/
c:\> pbidesktop.exe -source group2.pbix -publish https://app.powerbi.com/groups/
c:\> pbidesktop.exe -source group3.pbix -publish https://app.powerbi.com/groups/