Forum Discussion
Use datetable with multiple dates in one table
- 6 years ago
Anonymous , find the use of use relation here
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.
Anonymous , find the use of use relation here
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.
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!