Power BI Report Builder =Today() function in datetime parameter causing it to gray out

27 Views Asked by At

I was hoping someone could point me in the right direction. I am using Power BI Report Builder. I have a start date and end date parameter. My start data parameter is set to Data Type: Date/Time. Available values is set to None.

I want to set a default start date. For example, Today - 30 days. So, as a test, I tried to set the start date to today by entering =Today() as a function in the default value.

When I run the report, the start date parameter is grayed out. I am able to add a value like 2023.12.01 into the default value of the parameter and it works fine.

Any idea why =Today() would cause the parameter to gray out? Thanks in advance for any tips or clues that may solve this issue.

I have tried =Now() and =Today(). Both caused the parameter to gray out.

The issue seems to relate to the Dataset Query Parameter. (see link 4 below) I assume this because if I create a new report and pass =True() to a Date/Time parameter on my machine, it works fine.

I have tried to format the default parameter value to short date and I also tried to change the formatting in various ways in the Dataset Query Parameter formula with no luck.

Also, my query works fine if I do not set defaults on the start date and end date parameters. So, the issue is not related to the query design.

Parameter Type

Parameter Function

Start Date Parameter grayed out

Dataset Query Parameter Function

1

There are 1 best solutions below

0
Amira Bedhiafi On

Simply because the function you need to use in the expression is Today :

enter image description here

enter image description here

Result :

enter image description here