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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jnaugle
Helper I
Helper I

Help needed with Report Builder

I am trying to put in a date parameter and having issues. Please Help.

 

jnaugle_0-1620153664436.png

 

 

 

 

Query (1, 104) 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.

2 ACCEPTED SOLUTIONS
jnaugle
Helper I
Helper I

I was able to format my date using expressions and now that report functions as it should

Thank you for the input

Jamie

View solution in original post

=Format((Parameters!FromFinalTablePostedPostingDate.Value), "MM-dd-yyyy")

View solution in original post

12 REPLIES 12
jnaugle
Helper I
Helper I

I was able to format my date using expressions and now that report functions as it should

Thank you for the input

Jamie

Hi @jnaugle 

 

Glad that you have found the solution. Can you share your formatting expressions and the data types of both paramter and column field? 

 

My date column in SQL DB is Text type. However, when I connect to it in Report Builder, I can set a parameter with date/time type to filter the report. And I cannot reproduce "The property doesn't have the expected type" error. Not sure if there is some type detection or convertion happening automatically. 😅

 

Regards,
Jing

=Format((Parameters!FromFinalTablePostedPostingDate.Value), "MM-dd-yyyy")

Thank you

jnaugle
Helper I
Helper I

I am just trying to filter the entire report by date. If use it all as text and enter date manually then it works. If I configure as a date/time to use the calendar picker in the parameter field then it all fails and I get the error regarding not the expected data type. I am unsure how to configure the data field to be read as a date. Hope this helps clear up my issue.

Thanks Jamie

jnaugle
Helper I
Helper I

Anyone? I really am stumped on this. 

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.

 

amitchandak
Super User
Super User

@jnaugle seem like you are passing text to the date. check the parameter datatype

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Forgive me this is my first time using report builder and I am do not know how to change the data type

j

I have changed the parameter type to Date/Time and now get this error. Help Please

 

jnaugle_0-1620232091215.png

 

Hi @jnaugle 

 

After changing the parameter type to Date/Time, you could give it a default value in the Date/Time format. Don't forget the time part.

050706.jpg

 

If the parameter is used to filter a specific field, you can also check the parameter option for the field when you design the query. Then a parameter with the same name as the field will be added. In this way, it will select a proper data type for the parameter according to the field automatically. You can modify the properties of this parameter later just like modifying other parameters.

050707.jpg

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

jnaugle_0-1620396170601.png

I must be missing something I am getting this error now,

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.