vbapowerbireportbuilder3.0

Visual Basic MS Report Builder - How can we set Min(Date) as the default value for a parameter


I am connected a power bi dataset to the MS Report Builder and I need to find a way to set the min date of my date column as default value in my parameter. I setup the a from and to date as date range to filter my data.

I tried

First(Fields!Date.Value, "DataSet1")

but I get this error

A 'Value' expression used for the report parameter 'FromDate' refers to a field.  Fields cannot be used in report parameter expressions.

What's the right way of writing this expression?

enter image description here


Solution

  • Create a new Dataset that returns the min date and use that.

    enter image description here