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
Anonymous
Not applicable

User enters values for query parameters

Question : Can Power BI allow users to enter values for query parameters  through slicers  in a custom parameterized query? The solution should  work on PowerBI.com ( online access , just not desktop version).

Even if someone have  connected to a database through ODBC or some scripting language and implemented a solution to the above , please share.Thanks

 

Sample Query

 

select datatable.* from table(date_compare(20200101,20200131,20190101,20190131))

inner join datatable

on date_id_curr = datecurrent and date_id_prev = dateprevious

where hour_id=3;

 

** datatable is a sample table

 

Similar Power BI query

 

"select datatable.* from table(date_compare(" & DATECURRENTSTART & "," & DATECURRENTEND & "," & DATEPREVIOUSSTART & "," & DATEPREVIOUSEND & ")) #(lf)inner join datatable #(lf)on date_id_curr = datecurrent and date_id_prev = dateprevious#(lf)where hour_id=3;#(lf)"

 

We know in Power BI Desktop,we can enter values for DATECURRENTEND, DATECURRENTSTART, DATEPREVIOUSEND and  DATEPREVIOUSSTART through Query parameters

But we want the end user to enter values for these parameters in Power BI .com

 

 

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

As a report creator, you define parameters in Power BI Desktop. When you publish the report to Power BI Service, the parameter settings and selections travel with it. You can review and edit parameter settings in Power BI Service, but not create them. You may edit parameters whose data type is not 'Any' or 'Binary'.

 

You may use query parameter to filter rows, parameterize a data source, loading dynamic columns from the data source and so on.

 

For further information, please refer to the following links.

Edit parameter settings in the Power BI service 

Power BI Desktop Query Parameters 

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

 

Pragati11
Super User
Super User

HI @Anonymous ,

 

Try looking into What-if parameters in POwer BI:

https://radacad.com/power-bi-what-if-parameters

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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 Solution Authors
Top Kudoed Authors