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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Pramit4u
New Member

Let the end user choose the query parameters used to pull data into Power BI using a direct query

I am trying to create a report from a direct query and that query has a start date and end date parameter which is used to fulfill certain WHERE conditions, say for example  WHERE EffectiveDate>StartDate AND EffectiveDate<EndDate.

 

Now as far as my understanding goes the end user has only access to the Slicer and we can then let the user slice the EffectiveDate. 

But is it possible if the end user can actually provide the Start Date and End Date and the Query then pulls in Data according to that. 

Capture1.JPG 

So in my report I am using a Slicer on the field Written_Date and on my Query I have a Start and End Date which controls the Written date that is populated from the query. So is there any way I can let the user choose the start date and end date.??

Capture2.JPG

 

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Pramit4u,

 

Choose DirectQuery mode and remove the WHERE condition.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That does not solve the purpose because the direct query I am using has some where logic which cannot be really overlooked.

 

Anonymous
Not applicable

The bottom line is your users won't be able to affect query parameters, mostly because they can't affect regular parameters once the report is published.

 

I would have to see your entire query and how you're using those dates to advise further. There are a few edge-case possibilities that might be possible leveraging PowerApps alongside your report, because I believe you can modify parameters via PowerShell/Power BI API.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors