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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
dashmarley11
Helper III
Helper III

Passing Parameter from PowerBI Table to SQL Query

I have a SQL query with two parameters that I'd like to pass by using slicer that uses a lookup table in PowerBI that I manually update/maintain.

[Query="Select * #(If) FROM dbo.DataTable #(If) WHERE TapeDate =@StartDate AND VersionID = @VerID] 

 

Lookup Table that I manually maintain and update every month with the correct Start Date and Version ID:

MonthEndStartDateVerID
JAN-202401/31/20248
FEB-202402/15/20242
MAR-202403/22/20245

 

Using a Slicer, I would like to be able to select a "MonthEnd" date and have it automatically pass the corresponding "StartDate" and "VerID" to my SQL query.

3 REPLIES 3
dashmarley11
Helper III
Helper III

@Anonymous  It seems like there aren't any solutions for this, correct?  Is this a widely known limitation for PowerBI?

Anonymous
Not applicable

Hi @dashmarley11 ,

 

Can you provide some screenshot information and describe it?

 

Best Regards,
Adamk Kong

 

@Anonymous 

2024-07-05_ftp.png

 

I have this SQL query and would like to pass date parameters to the query, using a date slicer.  

Every month there will be a "final" Version ID that I will need to manually enter into some type of lookup table.  Possibly something like this:

2024-07-05_dates.png

 

 

 

 

Using a date slicer, I would like to be able to select a "MonthEnd" date that would then pull in the corresponding "StartDate" and "VerID" and pass those parameters to the SQL query, that would then render results.  

For example, If I were to select "JAN-2024" in the date slicer, then my query should render results where the "TapeDate= @StartDate(12-31-2023) and VersionID = @VerID(6)"

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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