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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX Date Parameter Paginated Report Format Error

Hi,

I've created a Startdate and EndDate paramater for my paginated report that I'm referencing in my query.

Both Startdate and EndDate have been set up as below using DateTime, both available and default values are set to None. 

Burner1994_0-1669996812048.png

I'm trying to add these two parameters to this query (which works and returns data).

 

EVALUATE
	CALCULATETABLE(
		SUMMARIZECOLUMNS('factfile'[LineID], 'factfile'[Date], 'factfile'[ZKF_VALUE])

 

I think it should go something like this, but I keep receiving errors.

 

EVALUATE
	CALCULATETABLE(
		SUMMARIZECOLUMNS('factfile'[LineID], 'factfile'[Date], 'factfile'[ZKF_VALUE]),
	'Factfile'[Date] >= @StartDate,
	'Factfile'[Date] <= @EndDate)

 

The error I receive is: 

DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.

I've tried to format both parameters in the query in the following ways (which work with query builder code), but don't with my simpler DAX.

Burner1994_1-1669997139250.png

Has anyone figured out how to get around this?

 

 

4 REPLIES 4
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

Did you check that this field is a date type field? Also, even by customising the date type, it needs to meet a recognisable date type, otherwise after FORMAT it corresponds to a text type.

Factfile'[Date]

 

refer to below:

Power BI Date Formatting | How to Change Date Format in Power BI? (wallstreetmojo.com)


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

 

Anonymous
Not applicable

@v-henryk-mstf 

 

Hi Henry,

 

Thanks for the response. I've set my date field to be a dd/mm/yyyy format in my data set and in PBI RB I've tried to write in the paramter to be this same format. I've also included the error message below. This must be a simple fix?

 

Burner1994_0-1670348650336.png

Burner1994_1-1670348694872.png

 

 

 

Query (4, 2) DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
----------------------------
Query execution failed for dataset 'Factfile2'.
----------------------------
An error has occurred during report processing.
----------------------------
An error occurred during local report processing.

 

It appears that unintentionally hidden date datasets may have been generated. To address this, please follow these steps: Right-click on the Datasets, select "Show Hidden," and proceed to delete the two hidden datasets.

 

It's possible that these datasets were inadvertently created through the use of the "Available Values" option on each parameter, which automatically generates DAX data tables. In my experience, these hidden tables often include a NULL record, contributing to the issue you've described.

 

If your intention was to utilize Available Values for a specific purpose, the aforementioned suggestion may not be applicable to your situation. Feel free to provide more details if additional assistance is required.

bradsy
Microsoft Employee
Microsoft Employee

Maybe make sure the text is date type in the DAX query? https://learn.microsoft.com/en-us/dax/date-and-time-functions-dax 


Something like: DATEVALUE(@StartDate)

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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