Forum Discussion

abhidotnet's avatar
abhidotnet
Advocate II
1 year ago
Solved

Automated Power BI Report with Parameter

Hi all,

I’ve created a Power BI report that connects to a Table Valued Function (TVF) in a SQL Mirror Database. The function takes a single parameter — an input date — which I pass via a parameter configured in the semantic model.


Here’s what I’ve done so far:

  1. Created and published the Power BI report.

  2. The report uses Import Mode to call a SQL TVF with a date parameter. (see screenshot)

     

  3. I’ve defined this date as a parameter in the semantic model.

Now, I want to automate this report to refresh and generate output (EXCEL or similar) on the first of every month, using that month's start date as the parameter.

Questions:

  • Is this automation possible within Microsoft Fabric?

  • Can I dynamically pass the date parameter (e.g., first day of the current month) at refresh time?

  • What combination of tools (Data Factory, Data Activator, Power Automate, etc.) would be recommended?

  • Is exporting the report to Excel and distributing it via email also doable as part of the automation?

Any guidance, best practices, or links to documentation would be greatly appreciated!

Thanks in advance!

  • Can I dynamically pass the date parameter (e.g., first day of the current month) at refresh time?

    It's a two step process

    1. set parameter

    2. initiate refresh

     

    You would need to use a custom connector that can run REST API calls.

3 Replies

  • Can I dynamically pass the date parameter (e.g., first day of the current month) at refresh time?

    It's a two step process

    1. set parameter

    2. initiate refresh

     

    You would need to use a custom connector that can run REST API calls.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  abhidotnet 

    Yes, this is totally doable. You'll need to.

    1. Use Power Automate to trigger on the 1st of every month.
    2. In the flow, calculate the first day of the month and use the Power BI REST API to update the parameter.
    3. Then call the refresh API to refresh the dataset.
    4. (Optional) After a delay, use the export API to generate an Excel/PDF and email it out.


    Regards,
    Akhil.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi abhidotnet ,

    I’m following up to confirm that all items discussed have been addressed. If there’s anything else you need, I’d be happy to assist.

    Regards,
    Akhil.