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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
Helper II
Helper II

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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