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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
luzrueda
Frequent Visitor

Tickets wöchentlich zählen zwischen Start- und Enddatum

Ich habe ein Startdatum und ein Enddatum für Tickets in einer Datei. Ich möchte in einem Balkendiagramm darstellen, wie viele Tickets jede Woche offen sind. Mit welcher Formel kann ich diese Darstellung entwickeln?

Zum Beispiel: Ticket 1 muss jede Woche einmal erscheinen – zwischen dem 03.03.2025 und dem 22.04.2025.
Wenn kein Enddatum vorhanden ist, soll das Ticket bis zur aktuellen Woche jeweils einmal erscheinen. Zum Beispiel: Ticket 3 ist seit dem 12.05.2025 offen und hat kein Enddatum – es ist also bis heute aktiv.

Vielen Dank für eure Unterstützung!

 

Billette

Anfangen

Ende

1

03.03.2025

22.04.2025

2

02.03.2025

20.03.2025

3

12.05.2025

 

4

12.12.2024

30.03.2025

5

08.01.2025

12.04.2025

2 ACCEPTED SOLUTIONS
SundarRaj
Super User
Super User

Hi @luzrueda ,
is this what you are looking for? Thanks

 

SundarRaj_0-1752210864456.png

SundarRaj_1-1752210930973.png

 

I'll leave the file link below:


https://docs.google.com/spreadsheets/d/1fkFpnc-77pA8bJFLfVGl2UZwoCgMXrUQ/edit?usp=sharing&ouid=10475...

Thanks

 

Sundar Rajagopalan

View solution in original post

Anonymous
Not applicable

Hi @luzrueda,

Thanks for reaching out to the Microsoft fabric community forum.

To achieve the weekly count of open tickets, you’ll need to generate a row for each week a ticket is open, and then count how many tickets are open per week.

Here’s how you can approach this:
* Create a separate table with all Mondays (or any consistent weekday) from the earliest start date (e.g., 01.01.2025) to today. Each row represents the start of a week.
* Normalize your ticket data, for tickets with no End Date, replace it with TODAY() or the last date in your calendar table. Make sure both Start and End Dates are in Date format.

* Create a Mapping Table (Ticket-Week Matrix), for each ticket, generate all weeks between Start and End Date. In Excel/Power Query, this can be done with a custom function or using Power BI with a GENERATE + CALENDAR or ADDCOLUMNS.

DAX:

TicketWeeks =
GENERATE(
Tickets,
ADDCOLUMNS(
CALENDAR(
STARTOFWEEK(Tickets[Start Date], 2),
IF(
ISBLANK(Tickets[End Date]),
TODAY(),
STARTOFWEEK(Tickets[End Date], 2)
)
),
"WeekStart", [Date]
)
)
This will give you one row per week that each ticket is active.

* Now you can create a measure or simple count grouped by WeekStart to see how many tickets are open each week. And for visualization part use the WeekStart as the X-axis and the count of tickets as the Y-axis in a Bar Chart.

 

If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

Best Regards,
Hammad.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @luzrueda,

Thanks for reaching out to the Microsoft fabric community forum.

To achieve the weekly count of open tickets, you’ll need to generate a row for each week a ticket is open, and then count how many tickets are open per week.

Here’s how you can approach this:
* Create a separate table with all Mondays (or any consistent weekday) from the earliest start date (e.g., 01.01.2025) to today. Each row represents the start of a week.
* Normalize your ticket data, for tickets with no End Date, replace it with TODAY() or the last date in your calendar table. Make sure both Start and End Dates are in Date format.

* Create a Mapping Table (Ticket-Week Matrix), for each ticket, generate all weeks between Start and End Date. In Excel/Power Query, this can be done with a custom function or using Power BI with a GENERATE + CALENDAR or ADDCOLUMNS.

DAX:

TicketWeeks =
GENERATE(
Tickets,
ADDCOLUMNS(
CALENDAR(
STARTOFWEEK(Tickets[Start Date], 2),
IF(
ISBLANK(Tickets[End Date]),
TODAY(),
STARTOFWEEK(Tickets[End Date], 2)
)
),
"WeekStart", [Date]
)
)
This will give you one row per week that each ticket is active.

* Now you can create a measure or simple count grouped by WeekStart to see how many tickets are open each week. And for visualization part use the WeekStart as the X-axis and the count of tickets as the Y-axis in a Bar Chart.

 

If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

Best Regards,
Hammad.

Vielen Dank!

SundarRaj
Super User
Super User

Hi @luzrueda ,
is this what you are looking for? Thanks

 

SundarRaj_0-1752210864456.png

SundarRaj_1-1752210930973.png

 

I'll leave the file link below:


https://docs.google.com/spreadsheets/d/1fkFpnc-77pA8bJFLfVGl2UZwoCgMXrUQ/edit?usp=sharing&ouid=10475...

Thanks

 

Sundar Rajagopalan

Vielen Dank!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

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.