Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hi.
I am developing a report for the financial sector with the aim of monitoring the default rate. To do this, I created a stored procedure that organizes the database, allowing the SQL program to return outstanding securities considering that specific date when a base date is entered.
The report is designed to visualize the default status of customers up to a certain date (base date). Therefore, it is necessary to provide a parameter whenever the report is analyzed, ensuring that the information is updated and consistent with the desired period. However, I am unable to pass a parameter from a slitter, for example, to the query.
This is just a draft with some items that will be used, it is far from being the final version of the front-end.
I would like to know if it is possible via Power BI to pass parameters from a slicer to Power Query.
In Power Query I can pass a fixed parameter, but I was unable to interact with a parameter selected in the Parameter field (Data set).
Solved! Go to Solution.
Consegui resolver usando função do SQL server.
Consegui resolver usando função do SQL server.
You should be able to add a line to your Query1 to format the SQL query. The use that line in the query call.
queryText = "EXEC sp_GetTitulos '" & dataset & "'",
Source = Sql.Database(SERVERNAME, DATABASENAME, [Query=queryText]
Proud to be a Super User! | |
I don't know if I understood. I summarized the M instruction and changed it according to your guidance and it works.
let
datasetOriginal = Text.From(Parameter1),
queryText = "EXEC sp_GetTitulos " & datasetOriginal,
Source = Sql.Database("SERVER", "DATABASE", [Query = queryText])
in
Source
However, I didn't understand how to change it dynamically in Power BI.
I need to pass the parameter dynamically from Power BI to Power Query.
User | Count |
---|---|
85 | |
73 | |
73 | |
57 | |
51 |
User | Count |
---|---|
44 | |
41 | |
35 | |
34 | |
30 |