Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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