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

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
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.

Top Solution Authors
Top Kudoed Authors