Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Help needed with Report Builder

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.

  • Anonymous's avatar
    Anonymous
    5 years ago

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

    Thank you for the input

    Jamie

  • Anonymous's avatar
    Anonymous
    5 years ago

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

12 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

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

    Thank you for the input

    Jamie

    • v-jingzhang's avatar
      v-jingzhang
      Community Support

      Hi Anonymous 

       

      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

      • Anonymous's avatar
        Anonymous
        Not applicable

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

  • Anonymous seem like you are passing text to the date. check the parameter datatype

    • Anonymous's avatar
      Anonymous
      Not applicable

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

      j

      • Anonymous's avatar
        Anonymous
        Not applicable

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

         

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anyone? I really am stumped on this. 

    • MarksmanWaugh79's avatar
      MarksmanWaugh79
      Frequent Visitor

      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.

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    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