cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rosenmeyer
Frequent Visitor

Custom Date column won't connect to Date Table

I have 2 identical SQL queries that are respectively imported query and one direct query from an Azure SQL database.

 

I need to make the imported query in direct query so I can make a scheduled refresh.

 

I have a date in the imported sales table [ClosedAt] that is Date/Time, I extract the date in a custom column [ClosedAtDate], because my Date/Time column [ClosedAt] won't connect unless it's only the date=

ClosedAtDay = DATE(YEAR('Sales import'[ClosedAt]);MONTH('Sales import'[ClosedAt]);DAY('Sales import'[ClosedAt]))
I make a connection to the date table with !imported SQL query! 'imported Sales'[ClosedAtDay] to 'DateTable'[Date] in the relationship model and it works with date filters and slicers.
 
I do the exact same for the !direct query table! and this error happens when I try to date filter anything by date slicer:
image.png
 
Both queries are identical.
5 REPLIES 5
Super User IV
Super User IV

Re: Custom Date column won't connect to Date Table

@Rosenmeyer why not change the data type of that column to date






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Rosenmeyer
Frequent Visitor

Re: Custom Date column won't connect to Date Table

@parry2k If I change the column to Date it just makes everything go (Blank) when I try to filter by date slicers.

Community Support
Community Support

Re: Custom Date column won't connect to Date Table

Hi @Rosenmeyer ,

 

I do the exact same for the !direct query table! 

Could you please share the formula that you create the column "CloseAtDate" for Directquery table? Are you creating it in the Power Query Editor?


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support
Community Support

Re: Custom Date column won't connect to Date Table

Hi @Rosenmeyer ,

 

Have you issue be resolved?Could you please provide more details about it If it still not be soleved? Please don't have any Confidential Information or Real data in your reply.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Rosenmeyer
Frequent Visitor

Re: Custom Date column won't connect to Date Table

Hi @v-lid-msft 

 

I used this formula

 

Dato = CALENDAR(DATE(2018;7;1);Format(MAXX(VALUES(Sales[ClosedAt]);Sales[ClosedAt]); "dd-mmmm-yy"))
 
That I found in another thread. I also deleted the custom SQL query and selected the table through Power Query instead, somehow worked, don't know what the issue was.

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors