Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
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
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.
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
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
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?
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!!
User | Count |
---|---|
21 | |
14 | |
11 | |
8 | |
5 |
User | Count |
---|---|
24 | |
22 | |
20 | |
15 | |
10 |