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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to pass parameters to Power BI at Runtime/Refresh Time

Hello,

 

I am migrating a report to Power BI.  In the original report, a user enters 2 parameters, a Start Date and End Date.

These are then passed to a query and used in a WHERE Clause.  (i.e.  Where Start Date = Parm1 AND End Date = Parm2).

 

Can I place any needed parameters in a spreadsheet and have PBI load the parms and use them in a WHERE clause?

 

Thanks in advance

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , First Create a query using advance editor and then right click in open that in advance editor

 

a string will use for sql

like

"Select * from Tab"

 

Modify that

"Select * from Tab where date= '" & [Date param] & "'"

 

use Date.Text  is case a format is need

Anonymous
Not applicable

Hello Amitchandak,

Can you contact me via email regarding my question?

I'm not sure how to create the query in the Advanced Editor.

Can we meet briefly via MS Teams or Zoom?

 

Thanks very much,
Rich
rstringer.cw@mmm.com

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.