Forum Discussion

BGB's avatar
BGB
Icon for Helper II rankHelper II
2 years ago

USEREALTIONSHIP convert to date in VAR

Hi all,

 

I have a calendar table date column that I'm trying to connect to my main table with an arrival date column. However, the arrival date is in datetime format. 

 

The question is: How do I convert the arrival date to use userelationship in my measure without creating a new date-only column?

Thanks in advance.

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BGB ,

    I'm a little confused about your needs, Could you please explain them further? It would be good to provide a screenshot of the results you are expecting and desensitized example data.

     

    Thanks for your efforts & time in advance.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • BGB's avatar
      BGB
      Icon for Helper II rankHelper II

      The question is to convert the date-time column to date only using Dax while using the USEREALTIONSHIP function.

      This is not very tricky. You have a date-time column that needs to connect to your calendar date column. Because the calendar date does not have time we need to convert our date-time column to date only but without doing that in Power Query , can it be done using DAX?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi BGB ,

        As Ashish_Mathur said, this shouldn't be possible with dax, it's recommended to get the data types converted first.

         

        Best regards,
        Community Support Team_Binbin Yu
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Hi,

    See if in the Query Editor, you can change the data type to Date (from Date/Time)

    • BGB's avatar
      BGB
      Icon for Helper II rankHelper II

      The desired outcome is to use the same date-time column converted within dax when using USERELATIONSHIP.