Forum Discussion
COUNTROWS using date problem
- 11 months ago
Dnssdrs Hi!
Which are your measures? Have you tried with:
Closed Tickets =
CALCULATE(
COUNTROWS(Tickets),
USERELATIONSHIP(Calendar[Date], Tickets[Closed Date])
)You can also try with:
Closed Tickets =
COUNTROWS(
FILTER(
Tickets,
Tickets[Closed Date] >= MIN(Calendar[Date]) &&
Tickets[Closed Date] <= MAX(Calendar[Date])
)
)BBF
💡 Did I answer your question? Mark my post as a solution!
👍 Kudos are appreciated
🔥 Proud to be a Super User!
- 11 months ago
Your relationship is wrong. You linked Calendar to Created Date, but Closed Date needs its own relationship.
Create an inactive relationship from Calendar[Date] to your tickets table[Closed Date]. Then use this measure:
Closed Tickets =
CALCULATE(
COUNTROWS(Tickets),
USERELATIONSHIP(Calendar[Date], Tickets[Closed Date])
)Use this measure in your trend line.
If this answer helped, please click Kudos or mark as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
Your relationship is wrong. You linked Calendar to Created Date, but Closed Date needs its own relationship.
Create an inactive relationship from Calendar[Date] to your tickets table[Closed Date]. Then use this measure:
Closed Tickets =
CALCULATE(
COUNTROWS(Tickets),
USERELATIONSHIP(Calendar[Date], Tickets[Closed Date])
)
Use this measure in your trend line.
If this answer helped, please click Kudos or mark as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande