Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello All,
I am trying to create a report, where I'd like to show the total count of open tickets (backlogs) at the end of each month irrespective of current status as shown below:
New Date for Aging - If the ticket hasn't been resolved, eomonth date is considered for calculating Backlog age else resolved date is considered. I have put a sample data below to explain the scenario better. Please check and let me know, if you require any additional info.
Is there an easy way to find out the backlog age instead of creating new 6 columns to find the backlog age?
Ticket Key | Created Date | Resolved Date | EOM (based on created date) | New Date for Aging | Aging on eom Jul 23 | New Date for Aging | Aging on eom Aug 23 | New Date for Aging | Aging on eom Sep 23 |
CC1 | 05-Jul-23 | 02-Oct-23 | 31-Jul-23 | 31-Jul-23 | 26 | 31-Aug-23 | 57 | 30-Sep-23 | 87 |
CC2 | 05-Jul-23 | 31-Jul-23 | 31-Jul-23 | 26 | 31-Aug-23 | 57 | 30-Sep-23 | 87 | |
CC3 | 05-Jul-23 | 31-Jul-23 | 31-Jul-23 | 26 | 31-Aug-23 | 57 | 30-Sep-23 | 87 | |
AB1 | 01-Aug-23 | 01-Aug-23 | 31-Aug-23 | 01-Aug-23 | 0 | 01-Aug-23 | 0 | ||
AB2 | 01-Aug-23 | 05-Sep-23 | 31-Aug-23 | 31-Aug-23 | 31 | 05-Sep-23 | 36 | ||
AB3 | 01-Aug-23 | 01-Aug-23 | 31-Aug-23 | 01-Aug-23 | 0 | 01-Aug-23 | 0 | ||
AB4 | 01-Aug-23 | 31-Aug-23 | 31-Aug-23 | 31 | 30-Sep-23 | 61 | |||
AB5 | 02-Sep-23 | 02-Sep-23 | 30-Sep-23 | 02-Sep-23 | 0 | ||||
AB6 | 02-Sep-23 | 02-Sep-23 | 30-Sep-23 | 02-Sep-23 | 0 | ||||
AB7 | 02-Sep-23 | 02-Oct-23 | 30-Sep-23 | 30-Sep-23 | 28 |
Solved! Go to Solution.
Hi @BeIntel
You can create a date table
e.g
Table 2 = CALENDAR(DATE(2023,1,1),DATE(2023,12,31))
Then create a measure
Measure =
IF (
SELECTEDVALUE ( 'Table'[Resolved Date] ) <> BLANK (),
IF (
MAX ( 'Table 2'[Date] ) >= SELECTEDVALUE ( 'Table'[Created Date] )
&& MAX ( 'Table 2'[Date] ) < SELECTEDVALUE ( 'Table'[Resolved Date] ),
DATEDIFF (
SELECTEDVALUE ( 'Table'[Created Date] ),
EOMONTH ( MAX ( 'Table 2'[Date] ), 0 ),
DAY
),
IF (
EOMONTH ( MAX ( 'Table 2'[Date] ), 0 )
= EOMONTH ( SELECTEDVALUE ( 'Table'[Resolved Date] ), 0 ),
DATEDIFF (
SELECTEDVALUE ( 'Table'[Created Date] ),
SELECTEDVALUE ( 'Table'[Resolved Date] ),
DAY
)
)
),
IF (
MAX ( 'Table 2'[Date] ) >= SELECTEDVALUE ( 'Table'[Created Date] )
&& MAX ( 'Table 2'[Date] ) <= MAXX ( ALLSELECTED ( 'Table 2' ), [Date] ),
DATEDIFF (
SELECTEDVALUE ( 'Table'[Created Date] ),
EOMONTH ( MAX ( 'Table 2'[Date] ), 0 ),
DAY
)
)
)
Then create a table visual, and and put the date column and ticket key and measure to it.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @BeIntel
You can create a date table
e.g
Table 2 = CALENDAR(DATE(2023,1,1),DATE(2023,12,31))
Then create a measure
Measure =
IF (
SELECTEDVALUE ( 'Table'[Resolved Date] ) <> BLANK (),
IF (
MAX ( 'Table 2'[Date] ) >= SELECTEDVALUE ( 'Table'[Created Date] )
&& MAX ( 'Table 2'[Date] ) < SELECTEDVALUE ( 'Table'[Resolved Date] ),
DATEDIFF (
SELECTEDVALUE ( 'Table'[Created Date] ),
EOMONTH ( MAX ( 'Table 2'[Date] ), 0 ),
DAY
),
IF (
EOMONTH ( MAX ( 'Table 2'[Date] ), 0 )
= EOMONTH ( SELECTEDVALUE ( 'Table'[Resolved Date] ), 0 ),
DATEDIFF (
SELECTEDVALUE ( 'Table'[Created Date] ),
SELECTEDVALUE ( 'Table'[Resolved Date] ),
DAY
)
)
),
IF (
MAX ( 'Table 2'[Date] ) >= SELECTEDVALUE ( 'Table'[Created Date] )
&& MAX ( 'Table 2'[Date] ) <= MAXX ( ALLSELECTED ( 'Table 2' ), [Date] ),
DATEDIFF (
SELECTEDVALUE ( 'Table'[Created Date] ),
EOMONTH ( MAX ( 'Table 2'[Date] ), 0 ),
DAY
)
)
)
Then create a table visual, and and put the date column and ticket key and measure to it.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
100 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
106 | |
104 | |
85 | |
73 |