Forum Discussion
Overlaps per month
- 4 years ago
Excel worksheet formula is powerful enough to solve this simple question,
Hi Patrick_BT ,
You'll need to create a calendar dimension table. There's plenty of examples online either in DAX or Power Query (recommended). Your calendar table will need at leaste Date and Month/Year (MM.yyyy).
Once you have that, the basic measure structure for your counts would be something like this:
_openTickets =
VAR __maxDate = MAX(calendar[date])
VAR __minDate = MIN(calendar[date])
RETURN
CALCULATE(
DISTINCTCOUNT(yourTable[TicketID]),
yourTable[Priority] = "Blocker",
FILTER(
yourTable,
yourTable[Created] <= __maxDate
&& yourTable[Resolved] >= __minDate
)
)
Use calendar[YearMonth] and [_openTickets] in your visual.
Pete
Hi Pete,
thanks, I have created the calendar table and the measure already looks good.
Is it possible to extend it so that not all tickets from e.g. 04.2021 are counted, but only the maximum number of concurrently open tickets?
Ticket ID 1 is currently also counted although there was no overlap with the other tickets in April.
Many greetings
Patrick