Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Report builder date range parameter

I am trying to create a paramater date range in Report builder and i keep getting this error (Query (1, 90) 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.) the column shows its a date / time   when i open the dataset in power BI and even in the database that column shows its date however when i try to use it a parameter date range i get an error . Does anyone have any idea of how to resolve this in report builder?

10 Replies

    • nr_q's avatar
      nr_q
      Frequent Visitor

      This is it, this is the answer. Was struggling with this off a semantic model hosted on Fabric, he shows the correct DAX to use instead of jumping through the string formatter hoops. I ended up needing to use SELECTCOLUMNS() in addition to SUMMARIZECOLUMNS() to get similar results to my Dashboard results, but this pointed me in the right direction. Thank you Heba!

    • Anonymous's avatar
      Anonymous
      Not applicable

      This does not address my issue unfortunately

      • gpiauilino's avatar
        gpiauilino
        Frequent Visitor

        I am also facing this problem for a few days.
        I can't set my date range to DateTime, and I haven't found a solution yet.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

     

    Kind of late but this worked for me:

    =Format(Parameters!YourParameter.value,"yyyy-MM-dd")

     

    I had this problem when tyring to use a field from a DB2 database that was only date and not datetime and again recently when using a Power BI dataset connection as my datasource. What you want to do is use the above formula in the "Parameter Value" field of your desired dataset. Just replace "YourParameter" with the parameter you want to use.  I attached a visual below. Hopefully this helps you out.  gpiauilino Hopefully this helps you out too.