Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
giovanna8988
Frequent Visitor

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!

1 ACCEPTED SOLUTION

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

 

View solution in original post

5 REPLIES 5
jewel_at
Resolver I
Resolver I

Hi @giovanna8988 

 

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

 

jewel_at_0-1672780382822.png

 

Hope that helps!

Jewel

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

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

 

This worked! Thank you! Along with making sure I was using a measure function to calculate count rather than allowing PowerBI to calculate it for me.

Cool!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.