Forum Discussion
Can end users Input parameters in a Power App form and pass it to a Power BI query ?
- Anonymous1 year ago
Hey nvalPBI ,
You’ve done all the hard work already great job.Now to plug that SharePoint date into your SQL query, here’s exactly what you need to do.
- Load your SharePoint list into Power BI
→ Make sure it includes the Term Date the user entered. - Keep just the latest Term Date
→ In Power Query, sort by Created Date (or ID), keep the top 1 row. - Create a parameter in Power BI
- Go to: Manage Parameters → New Parameter
- Name: TermDateParam
- Type: Date
- Set a dummy default value for now (we’ll override it)
- Use that parameter in your SQL query
- In Power Query, edit your SQL like this.
let
TermDate = TermDateParam,
Source = Sql.Database("YourServer", "YourDB",
[Query = "SELECT * FROM YourTable WHERE TermDate = '" & Date.ToText(TermDate, "yyyy-MM-dd") & "'"])
in
Source5. Link the SharePoint date to the parameter
- In Power Query, get the latest Term Date from the SharePoint table
- Use it to replace the parameter’s value
Regards,
Akhil. - Load your SharePoint list into Power BI
Hi nvalPBI
Yes, you can let users enter a date in a Power App form and use that in Power BI to get specific data. Here’s how it works, in easy steps.
You don’t want to hardcode a date anymore. Instead, you want users to type or pick a date in a form, and then Power BI should use that date to pull the right data.
Try Build a simple form in Power Apps
Add a Date Picker control this lets users choose a date easily.
- When they submit the form, save that date. You can save it in something like. A SQL table (best if your data is already in SQL), A SharePoint list, A small Excel file on OneDrive, Or Dataverse (if you're using Microsoft’s Dataverse).
- In Power BI, connect to that table. Power BI can read the table where the user’s selected date is stored.
- Use that date inside your SQL query or filters. When Power BI loads data, it can read the user-entered date and apply it in the SQL or DAX logic to show only the relevant results.
- Make it real-time (optional). If you want it to instantly update Power BI when the user picks a new date, you can use DirectQuery or a Power Automate flow to refresh Power BI right after form submission.
After You have a clean form that says. “Please choose a date to load the report”
The user picks June 1st. You press submit. Boom Power BI loads data just for June 1st. And remember no more editing queries manually.
------------------------------------------------------------------------------------------------------------------------------
If this solution works for you, please consider marking it as accepted so others facing a similar issue can benefit too.
Regards,
Akhil.