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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
mcody
Frequent Visitor

Modify SQL query paramters from Report running on service

Hi,

Would likre report user to be able to change start/end date for report (on service) and send parameters to SQL to retrieve dataset.

 

I can add parameters on Power BI desktop but cannot figure out how to add parameter to report and send to SQL.

 

Is this possible?

 

We are running Power BI Pro.

 

Thanks

1 ACCEPTED SOLUTION

Hey @mcody ,

 

what you are looking for is not possible, as @Bamak already mentioned. Parameters are not an interactive feature, and for this: using dataflows will be of no help.

 

Consider using directquery, here data "remains" inside the source system. But be aware, that this means you need a star schema (this means a dwh), if you have to avoid importing all possible data.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
Bamak
Helper V
Helper V

Hi mcody

 

  • On repport you manage dynamic filters (Whatever the content of the dataset , based on tables relationships)
  • On PBI service , you can manage query (lg M) parameters  value via DATASET parameters

Here, obviously we are not on something which must be handled by the users of the reports, but controlled by the manager of the dataset
The goal is to optimize the number of lines returned by the query (type folding) to the source
I advise to look at the mechanics set up for the incremental ETL (available for pro for 2 weeks)

 

A Query M sample :

let
Source = Sql.Database("XXXXXXXX", "YYYYY"),
dbo_DimProduit = Source{[Schema="dbo",Item="DimProduit"]}[Data],
#"Lignes filtrées" = Table.SelectRows(dbo_DimProduit, each [ProduitCode] = codeProduit)
in
#"Lignes filtrées"

 

This will generate the folding SQL request (show native query)

select [_].[Produit_PK],
[_].[ProduitCode],
[_].[Produit],
[_].[SousFamilleCode],
[_].[SousFamille],
[_].[FamilleCode],
[_].[Famille],
[_].[URL_Photo_famille],
[_].[Valide]
from [dbo].[DimProduit] as [_]
where [_].[ProduitCode] = 'LL1100'

 

Regards

 

Christophe 

mcody
Frequent Visitor

Hi Christophe,

 

Thanks for reply.

 

Is the functionality you mention only available on Premium? We are on Pro only.

 

 

I would like the user to interact with the parameter, pick date, date goes to SQL, data for just that date comes back.

Reuirement is to be able to pick one date form  a number of years data, so to import all possible data to service and use a slicer is not practical.

 

 

I have done this for paginated report using Report Builder, but these reports cannot be published to service - as far as I know.

 

I am wondering would Power BI dataflow work for this type of application? I see it looks like it is possible to add parameters to a dataflow.

 

Have you used these?

 

Thanks,

Michael

 

Hey @mcody ,

 

what you are looking for is not possible, as @Bamak already mentioned. Parameters are not an interactive feature, and for this: using dataflows will be of no help.

 

Consider using directquery, here data "remains" inside the source system. But be aware, that this means you need a star schema (this means a dwh), if you have to avoid importing all possible data.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.