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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AlmostDev
New Member

Cannot match date to date table

I'm trying to make reports from our ticketing system. Most require displaying ticket count per month with some added info or filtering. I created a calendarauto table with relation to the ticket table in DB (directquery) and added a relationship. Problem is when using these together, the tickets' timestamps are matches with the whole date and time to rows in calendar so at the moment I get only a single match for a ticket that happens to have time 12:00:00 AM. I tried changing data types for the fields from datetime to date but that only changed displayed values. I have a separate GroupBy table that works to some extent but it breaks context and relations and probably something else I don't even know. 

Can I somehow enter custom aggregation or compare rules?
relationshipsrelationshipscreated visualization. Left is count of ticket Ids, calendar date, calendar month year part and ticket creatime_time., middle is raw calendar, right is raw ticket create_timecreated visualization. Left is count of ticket Ids, calendar date, calendar month year part and ticket creatime_time., middle is raw calendar, right is raw ticket create_time

1 ACCEPTED SOLUTION
onurbmiguel_
Super User
Super User

Hello AlmostDev

Did you need to use the hours? 

If not, go to power query and change to date the two columns. 

onurbmiguel__0-1660814998271.png

 

onurbmiguel__2-1660815071270.png

 

close and applly 

onurbmiguel__3-1660815136437.png

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


View solution in original post

4 REPLIES 4
onurbmiguel_
Super User
Super User

Hello AlmostDev

Did you need to use the hours? 

If not, go to power query and change to date the two columns. 

onurbmiguel__0-1660814998271.png

 

onurbmiguel__2-1660815071270.png

 

close and applly 

onurbmiguel__3-1660815136437.png

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! ;-
Best Regards
BC

 


Best regards


Bruno Costa | Super User


 


Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! 


Take a look at the blog: PBI Portugal 


 


I thought this wouldn't work because directquery doesn't allow data type changes but did for this? I just need the dates for this so this is fine. In order to still have times in case I need them (eg for SLA) I made a duplicate column which I changed to Date.

Some additional data type and format changes and now I have what I need
tables2.PNG

amitchandak
Super User
Super User

@AlmostDev , Create a new column

 

Create_date = Datevalue([Craeted_time])

 

join this with Date table

I would prefer this but I get "OLE DB or ODBC error: [Expression.Error] We couldn't fold the expression to the data source. Please try a simpler expression." when using the Datevalue.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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