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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
SeshadriP
New Member

Dynamic Parameters Creation in PowerBI Using Stored Procedure

Hello,

 

Can someone guide me, How can we create a dynamic parameters in PowerBi through Direct Query mode with Date parameter 

and date parameter should be in datetime format 

When we are trying to create an dynamic parameter and when we binding with the parameter in data modelling page, it's not getting accurate result and can't interact properly

@Microsoft Can you help me on the above query 

4 REPLIES 4
v-priyankata
Community Support
Community Support

Hi @SeshadriP 
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.

v-priyankata
Community Support
Community Support

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

v-priyankata
Community Support
Community Support

Hi @SeshadriP 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

andrewsommer
Super User
Super User

I assume you have already nabled dynamic M query parameters?

  1. Create a Parameter in Power BI
    1. Go to Modeling > New Parameter > Fields.
    2. Choose DateTime as the type.
    3. Provide a range (start, end, or list of dates if needed).
    4. This parameter will be used in an M Query.
  2. Modify the M Query in Power Query Editor
    1. Open Power Query Editor.
    2. Select the table connected via DirectQuery.
    3. Click Advanced Editor and modify the query like this:
let
    Source = Sql.Database("YourServer", "YourDatabase"),
    FilteredData = Table.SelectRows(Source, each [DateColumn] >= DateTime.From(#"YourParameter"))
in
    FilteredData

 

  1. Bind the Parameter to a Report Slicer
    1. To make the parameter interactive:
    2. Create a new table with a column containing datetime values.
    3. Create a slicer using that table.
    4. Bind the slicer to the parameter using Field Parameters.

Please mark this post as solution if it helps you. Appreciate Kudos.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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