March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
I am trying to put in a date parameter and having issues. Please Help.
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.
Solved! Go to Solution.
I was able to format my date using expressions and now that report functions as it should
Thank you for the input
Jamie
=Format((Parameters!FromFinalTablePostedPostingDate.Value), "MM-dd-yyyy")
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
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
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.
@jnaugle seem like you are passing text to the date. check the parameter datatype
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
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.
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.
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
I must be missing something I am getting this error now,
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
84 | |
66 | |
54 | |
43 |
User | Count |
---|---|
203 | |
106 | |
98 | |
65 | |
56 |