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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Use datetable with multiple dates in one table

I am quite new to Power Bi, and I'm just getting started to understand the basics of it.

Now, I came across a problem. I have got a data set with a table with customer support tickets containing multiple date fields (Ticket.CreatedDate and Ticket.ClosedDate). I want to make a graph where I can see the total amount of support tickets per week. To make this work, I discovered date tables in Power Bi. I created a date table containing date, using CALENDARAUTO(), weeknumber, year, month etc. etc.

But having a reationship between Ticket.CreatedDate and Calendar.Date, makes it unable to use Ticket.ClosedDate in another graph.

I have read something about USERELATIONSHIP in DAX, but I don't know how to make this work since I don't really need to calculate something. I only want to use year and weeknumber for zooming in (or 'filtering' or 'slicing') on my graphs.

How can I achieve what I am looking for?

 

Thanks in advance,

Werner

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , find the use of use relation here

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

 

Try like

Ticket Created = CALCULATE(COUNT(Ticket[Ticket Id ]),USERELATIONSHIP(Ticket[CreatedDate ],'Date'[Date]) )

Ticket Closed = CALCULATE(COUNT(Ticket[Ticket Id ]),USERELATIONSHIP(Ticket[ClosedDate],'Date'[Date]))

 

Join both dates with the date calendar. Use relation is optional with active join.

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , find the use of use relation here

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

 

Try like

Ticket Created = CALCULATE(COUNT(Ticket[Ticket Id ]),USERELATIONSHIP(Ticket[CreatedDate ],'Date'[Date]) )

Ticket Closed = CALCULATE(COUNT(Ticket[Ticket Id ]),USERELATIONSHIP(Ticket[ClosedDate],'Date'[Date]))

 

Join both dates with the date calendar. Use relation is optional with active join.

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

That's it!

 

The problem I was facing actually had nothing to do with the relationships.

My dataset uses datetime (dd/mm/yyyy hh:mm:ss) and the calendar I made obviously uses date (dd/mm/yyyy). I thought I formatted the dataset correctly in Power BI, but apparently BI is still unable to handle these (sort of) 'different' datatypes, although they look exactly the same. Had to change the dates in PowerQuery itself to make it work.

Anyways, Thanks a lot!

harshnathani
Community Champion
Community Champion

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.