Forum Discussion

giovanna8988's avatar
giovanna8988
Frequent Visitor
3 years ago
Solved

Calendar Table Not Connecting With Direct Query

Hello,

 

I am trying to relate my calendar table to a data set from a direct query, but my relationships are not matching. I am pretty certain it has to do with the fact my data set has date/time format. Unfortunately, I cannot use import and need to use direct query.

 

I have tried the following...

1. Utilizing SQL query to bring in the data set utilizing TO_DATE() function, but I can see somehow it is still pulling in a time.

2. Utilizing SUMMARIZE COLUMNS and SELECT COLUMNS to import the direct query data and changing the format from date/time to date.

 

Is there a DAX statement I can use within my summarize or select columns that will extract that date?

 

Thanks in advance!

  • jewel_at's avatar
    jewel_at
    3 years ago

    Oh Sorry!

    How about try this in your SELECT COLUMN, then change the data type to Date

     

     

    Left(CONVERT('Table'[Timestamp], STRING),10)

     

     

    This is given that your original date is mm/dd/yyyy hh:mm:ss

     

    Do you have a sample of your data?

     

    Jewel

     

5 Replies

  • Hi giovanna8988 

     

    Have you tried changing the data type of the date from your SELECT COLUMNS to "Date" ? Select the field >> Column Tools

     

     

    Hope that helps!

    Jewel

    • giovanna8988's avatar
      giovanna8988
      Frequent Visitor

      I have. That was that is what I am mentioning in attempt number 2 above.

      • jewel_at's avatar
        jewel_at
        Resolver I

        Oh Sorry!

        How about try this in your SELECT COLUMN, then change the data type to Date

         

         

        Left(CONVERT('Table'[Timestamp], STRING),10)

         

         

        This is given that your original date is mm/dd/yyyy hh:mm:ss

         

        Do you have a sample of your data?

         

        Jewel