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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ddalton
Resolver I
Resolver I

Paginated Reports Date Parameter "doesn't have the expected type"

I've just started out with Paginated Reports (after building several reports in Power BI Desktop). I'm using a Power BI data source (from existing reports), and I've created the dataset by copying the query of a Table visual in Power BI Desktop. The DAX Query validates, and I can build a table or matrix using the dataset. So far, so good. 

 

I now want to allow a report user to adjust the date range that is queried. Now because I copied the Table visual query, I have statement in the DAX Query that looks like this:

 

VAR __DS0FilterTable2 =
FILTER(
KEEPFILTERS(VALUES('BKS'[Date])),
AND(
'BKS'[Date] >= DATE(2022, 8, 15),
'BKS'[Date] < DATE(2022, 8, 25)
) 

 

So, I've created two parameters: DateStart and DateEnd, set appropriate default values for them (15/08/2022 00:00:00 etc.), and updated the query as follows:

 

VAR __DS0FilterTable2 =
FILTER(
KEEPFILTERS(VALUES('BKS'[Date])),
AND(
'BKS'[Date] >= @DateStart,
'BKS'[Date] < @DateEnd
) 

 

However, when I try to run the report I receive the following error:

 

"The property 'DefaultValue' of parameter 'DateStart' doesn't have the expected type". 

 

If I simply remove the default values, I'm able to use the date picker quite happily, so what format exactly is supposed to be used in the default value of a Date/Time type parameter? 

1 REPLY 1
v-stephen-msft
Community Support
Community Support

Hi @ddalton ,

 

Paginated report provides the parameters to use.

You could create the parameters through the following link.

Paginated report parameters - Microsoft Report Builder & Power BI Report Builder | Microsoft Docs

Also aybe the method from this post could help you.

vstephenmsft_0-1662101459356.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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