- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My brain doesn't function, help! Count overdues in a month.
Hi all,
My brain stopped working, can you help me figure this out?
I have a tabel with a start and finsih date per month (So per row a First day and a Last day of the month) and I want to add a calculated column to count the number of tickets in another table that were OPEN and OVERDUE in the month of the period from that row.
But is it possible to count in the fact if the order was open and overdue that month?
So many variables right..
The column where I count it in
Report[First day]
Report[Last day]
But I also have the:
IW38[Date created]
IW38[Date finsihed]
IW38[Duedate]
I cant share a PBIX file, but can someone tell me if it is possible what I am trying to do here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculated Column
OpenAndOverdueCount =
VAR StartDate = Report[First day]
VAR EndDate = Report[Last day]
RETURN
COUNTROWS(
FILTER(
IW38,
IW38[Date created] <= EndDate &&
(ISBLANK(IW38[Date finished]) || IW38[Date finished] >= StartDate) &&
IW38[Duedate] < EndDate
)
)
💌If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @IAM ,
You can try the following dax expression.
OpenAndOverdueTickets =
VAR StartDate = Report[First day]
VAR EndDate = Report[Last day]
RETURN
CALCULATE(
COUNTROWS(IW38),
IW38[Date created] <= EndDate,
IW38[Duedate] <= EndDate,
IW38[Date finished] > EndDate || ISBLANK(IW38[Date finished])
)
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @IAM Try below code to create a calculated column in Report table:
OverdueTickets =
CALCULATE(
COUNTROWS(IW38),
IW38[Date created] <= Report[Last day],
IW38[Duedate] <= Report[Last day],
IW38[Duedate] >= Report[First day],
ISBLANK(IW38[Date finished]),
IW38[Duedate] < TODAY()
)
Considering you have relation between Report and IW#* table.
Hope this helps!!
If this solved your problem, please mark this is a solution and a kudos!!
Best Regards,
Shahariar Hafiz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculated Column
OpenAndOverdueCount =
VAR StartDate = Report[First day]
VAR EndDate = Report[Last day]
RETURN
COUNTROWS(
FILTER(
IW38,
IW38[Date created] <= EndDate &&
(ISBLANK(IW38[Date finished]) || IW38[Date finished] >= StartDate) &&
IW38[Duedate] < EndDate
)
)
💌If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much!
If I make the calculated column in IW38, I can only give the 0 or 1 for one specific month, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @IAM
Try this step-by-step approach to achieve this:
Create a Calculated Column for Overdue Tickets: First, you need to determine if a ticket is overdue. You can create a calculated column in your IW38 table to check if the ticket is overdue.
IW38[IsOverdue] = IF(IW38[Date finished] > IW38[Duedate], 1, 0)
Create a Calculated Column for Open Tickets: Next, you need to determine if a ticket was open during the month. You can create a calculated column in your IW38 table to check if the ticket was open during the month.
IW38[IsOpenDuringMonth] =
IF(
AND(
IW38[Date created] <= Report[Last day],
OR(
ISBLANK(IW38[Date finished]),
IW38[Date finished] >= Report[First day]
)
),
1,
0
)
Count Overdue and Open Tickets: Now, you can create a calculated column in your Report table to count the number of tickets that were both open and overdue during the month.
Report[OverdueOpenTickets] =
CALCULATE(
COUNTROWS(IW38),
FILTER(
IW38,
IW38[IsOverdue] = 1 &&
IW38[IsOpenDuringMonth] = 1 &&
IW38[Date created] <= Report[Last day] &&
(ISBLANK(IW38[Date finished]) || IW38[Date finished] >= Report[First day])
)
)
This approach should help you count the number of tickets that were open and overdue during the specified month. Make sure to adjust the column names and table names according to your actual data model.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
06-15-2024 09:38 PM | |||
01-15-2024 02:13 AM | |||
02-20-2024 03:52 AM | |||
11-23-2023 02:13 AM | |||
Anonymous
| 12-24-2019 05:57 AM |
User | Count |
---|---|
22 | |
12 | |
10 | |
9 | |
8 |
User | Count |
---|---|
15 | |
15 | |
15 | |
12 | |
10 |