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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Patrick_BT
Regular Visitor

Overlaps per month

Hi all,
I have a table with tickets and I need to find out how many blocker tickets were open at the same time per month.

TicketIDCreatedResolvedPriority
101.04.202101.04.2021Blocker
201.04.202103.04.2021Standard
305.04.202131.06.2021Blocker
407.04.202111.04.2021Blocker
515.05.202120.05.2021Blocker

 

So the result should be:

  • 04.2021: 3 tickets (ID 3, 4 & 5)
  • 05.2021: 2 tickets (ID 3 & 5)
  • 06.2021: 1 ticket (ID 3)

Found some measures for overlapping values, but they always count per ticket and not by month, or the ticket always counts for the month it was created, but should be counted in every month it was open.
Thanks in advance,
Greetings Patrick

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

CNENFRNL_1-1645732341367.png

 

Excel worksheet formula is powerful enough to solve this simple question,

CNENFRNL_0-1645730764777.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

CNENFRNL_1-1645732341367.png

 

Excel worksheet formula is powerful enough to solve this simple question,

CNENFRNL_0-1645730764777.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

BA_Pete
Super User
Super User

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



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors