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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mp390988
Helper V
Helper V

report builder passing parameter

Hi,

 

I have a paginated report as below and I want to pass the two Parameters FromCalendarDate and ToCalendarDate to the Date field in my Rates dataset. 

mp390988_0-1754985577211.png

 

My Rates dataset is coming from the below mySQL script and you can see where I have highlighted in yellow is the name of the 2 parameters I want to pass.

mp390988_1-1754985775522.png

 

mp390988_2-1754985855882.png

 

I have formatted the value of my parameters so that it is in the format YYYY-mm-dd because when I run the mySQL directly as shown below, you can see I had to hardcode the dates in that format for it work:

mp390988_3-1754986043030.png

 

mp390988_5-1754986213122.png

 

and my query validates succesfully:

mp390988_6-1754986280060.png

 

But when I run the report, my tablix that is linked to my Rates datasouce is coming back empty even when I have set the From and To date as you can see from the snapshot below:

mp390988_7-1754986422161.png

 

You can also see I have an expression that prints what the From and To are but don't understand why mySQL script returns nothing?

Any help will be appreciated, thanks



 




2 REPLIES 2
v-nmadadi-msft
Community Support
Community Support

Hi @mp390988 
Thanks for reaching out to the Microsoft fabric community forum.


Please verify weather the Data type for the parameter is correct

vnmadadimsft_0-1755017174233.png

 



To do that, you could right click on parameter and then on parameter properties

vnmadadimsft_1-1755017174234.png

 



Additionally, test the query in MySQL with parameter values, copy your dataset query into MySQL Workbench, then replace @FromCalendarDate and @ToCalendarDate with the exact values captured from the report’s text box output. Run the query to confirm it returns rows; if it doesn’t, check for possible issues such as incorrect date formatting, missing single quotes around date values, or mismatches caused by any SQL command.

I hope this information helps. Please do let us know if you have any further queries.
Thank you

MohamedFowzan1
Responsive Resident
Responsive Resident

Hi @mp390988 

The approach used seems correct.

 

Steps:

  • Set Correct Data Type – Use the Date/Time type for report parameters instead of text.
  • Format Dates for MySQL – Map parameters in the dataset with expressions like=Format(Parameters!FromCalendarDate.Value, "yyyy-MM-dd")
    to match MySQL’s expected format.
  • Check Query & Parameter Mapping – Ensure parameter names match in the query and dataset mapping, and use proper syntax (e.g., BETWEEN @FromCalendarDate AND @ToCalendarDate).
  • Debug – Display formatted parameter values in the report to verify correctness before passing them to the query.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors