Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
What I need to produce is a running total of open service tickets by week with the ability to filter by ticket type which is done so by the ticket owner. So my data set has two date columns, one for date entered and another for date closed. If the ticket is still open, the date closed column is empty. For example:
Ticket Number | Ticket Owner | Date Entered | Date Closed |
100000 | JDoe | 1/1/2022 | 1/5/2022 |
100001 | JDoe | 1/3/2022 | 1/6/2022 |
100002 | MSmith | 1/5/2022 | |
100003 | JDoe | 1/7/2022 | 1/10/2022 |
100004 | MSmith | 1/9/2022 | |
100005 | JDoe | 1/14/2022 |
I have a date helper table to help associate the days to weeks, one of which is an inactive relationship. I have another employee table that associates employees (ticket owners) with the type of ticket.
So I have been successful in determining count of ticket entries using this DAX to create a measure:
Any help is appreciated!
Solved! Go to Solution.
Hi @cmarrazzo ,
Create a new calculated column to group the [Date Closed] field.
Week 2# = WEEKNUM('Tickets'[Date Closed],2)
Create a new measure that will be used later to determine what week it is in the current context.
Week = MAX('Table'[Week #])
Calculate the number of tickets closed for the week.
Current Week Ticket Closures =
CALCULATE(
COUNTA('Tickets'[Date Closed]),
FILTER('Tickets','Tickets'[Week 2#]=[Week]),
ALLSELECTED('Date Helper Table'[Day])
)
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@amitchandak So I understand the logic of this, but the issue I'm still having is getting it by week since week is a somewhat non traditional date type in Power BI.
And will this keep in tact the ability to filter by employee dimensions?
Hi @cmarrazzo ,
1. If Week is added directly to Page as an external filter, it can be filtered correctly by week and employee.
2. If you consider starting with models and formulas, you also need to create a new [week] column in the 'Tickets' table, and since it is a many-to-many relationship with the [week #] column in the 'Date Helper Table', you also need to create a new bridge table between them to connect.
It can also be filtered by week and employee.
Reference:
Many-to-many relationship guidance
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@Anonymous The only issue with this method is it associates week # with date entered only for each row. So it counts number of tickets closed but doesn't count those in the appropriate week.
Hi @cmarrazzo ,
Create a new calculated column to group the [Date Closed] field.
Week 2# = WEEKNUM('Tickets'[Date Closed],2)
Create a new measure that will be used later to determine what week it is in the current context.
Week = MAX('Table'[Week #])
Calculate the number of tickets closed for the week.
Current Week Ticket Closures =
CALCULATE(
COUNTA('Tickets'[Date Closed]),
FILTER('Tickets','Tickets'[Week 2#]=[Week]),
ALLSELECTED('Date Helper Table'[Day])
)
The PBIX file is attached for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
10 | |
10 | |
9 | |
7 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |