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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Pavani
Helper II
Helper II

How to Calculate Created, Closed and In progress incidents in DAX

Hi ,

 

How to show how many tickets in Created, Closed and In progress tickets in table format , below I attached screen shot of sample one. Created for Submitted Date and Closed for Resolved/ Completed Date . 

 

IPC dump based on Submit DateRegionAccountTicket TypeTicket NumberPriorityStatusAssigned Support Group (if available)Submit DateResolved / Completed DateClosed DateScheduled Start DateScheduled End dateChange Success/failCoordinator NameDomainProblem typeStatus reasonCategorySub BUPriorty2Ageing
IPC dump based on Submit DateGermanyPYIncidentINC00000024689mediumResolvedDatabase - Oracle7/1/2024Monday, July 1, 2024    Database - Oracle P3EU2P3 & P430days
IPC Backlog (Open tickets) dataGermanyPYIncidentCRQ000000007542lowImplementation In ProgressWindows6/4/2024      SCCM Operations P4EU2P3 & P430days
IPC dump based on Closed DateEuropeShIncidentINC118272071highResolvedNon-core team6/30/2024Monday, July 1, 2024Monday, July 1, 2024   Network  P2EU2P1 & P230days
IPC dump based on Closed DateEuropeShIncidentINC119282056criticalResolvedMicrosoft7/18/2024Tuesday, July 23, 2024Tuesday, July 23, 2024  Application P1EU2P1 & P230days

 

 

 

  1. Incident Management P1/P2 - MTD Status: (Created, Closed and In progress incident High and Critical for P1 & P2 tickets).
  2. 0-7 Days, 'Is >7 Days, Is >15 Days and Is >30 Days for open data .
  3. Incident Management P3/P4 - MTD Status: (Created, Closed and In progress incident Medium and Low for P3 & P4 tickets).
  4. 0-7 Days, 'Is >7 Days, Is >15 Days and Is >30 Days for open data .
  5. Incident Management P1/P2 - Last 7 Days Status: (Created, Closed and In progress incident High and Critical for P1 & P2 tickets).
  6. 0-7 Days, 'Is >7 Days, Is >15 Days and Is >30 Days for open data .
  7. Incident Management P3/P4 - Last 7 Days Status: (Created, Closed and In progress incident Medium and Low for P3 & P4 tickets).
  8. 0-7 Days, 'Is >7 Days, Is >15 Days and Is >30 Days for open data .
  9. Incident Management P1/P2 - Last 24 Hours Status: (Created, Closed and In progress incident High and Critical for P1 & P2 tickets).
  10. 0-7 Days, 'Is >7 Days, Is >15 Days and Is >30 Days for open data .
  11. Incident Management P3/P4 - Last 24 Hours Status: (Created, Closed and In progress incident Medium and Low for P3 & P4 tickets).
  12. 0-7 Days, 'Is >7 Days, Is >15 Days and Is >30 Days for open data .

Pavani_0-1724181884068.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Pavani ,

 

Here are the steps you can follow:

1. Create calculated column.

Ageing =
var _if=
IF(
'Table'[Status]="Implementation In Progress",
DATEDIFF('Table'[Submit Date],TODAY(),DAY),
IF(
    'Table'[Closed Date]=BLANK(),
  DATEDIFF('Table'[Submit Date],'Table'[Resolved / Completed Date],DAY),
    DATEDIFF('Table'[Submit Date],'Table'[Closed Date],DAY) ))
return
SWITCH(
    TRUE(),
    _if>=0&&_if<=7,"0-7Days",
    _if>7&&_if<=15,"Is>7Days",
    _if>15&&_if<=30,"Is>15Days",
    "Is>30Days")

vyangliumsft_0-1724207619931.png

2. Enter data – Table.

vyangliumsft_1-1724207619933.png

3. Because the default Power BI sorting is alphabetical, in order to prevent the appearance of the sorting does not meet your requirements, we can sort according to [Index] to sort.

vyangliumsft_2-1724207661340.png

4. Create measure.

Measure =
SWITCH(
    TRUE(),
    MAX('Table2'[Group]) = "Created",COUNTX(FILTER('Table','Table'[Submit Date]<>BLANK()),[Domain]),
    MAX('Table2'[Group]) = "Closed",COUNTX(FILTER('Table','Table'[Status]="Resolved"),[Domain]),
    MAX('Table2'[Group]) = "In Progress",COUNTX(FILTER('Table','Table'[Status]="Implementation In Progress"),[Domain]),
    COUNTX(
        FILTER('Table',
        'Table'[Ageing]=MAX('Table2'[Group])),[Ageing]))

5. Result:

vyangliumsft_3-1724207661347.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
Pavani
Helper II
Helper II

Thank you so much Its working . 

Anonymous
Not applicable

Hi  @Pavani ,

 

Here are the steps you can follow:

1. Create calculated column.

Ageing =
var _if=
IF(
'Table'[Status]="Implementation In Progress",
DATEDIFF('Table'[Submit Date],TODAY(),DAY),
IF(
    'Table'[Closed Date]=BLANK(),
  DATEDIFF('Table'[Submit Date],'Table'[Resolved / Completed Date],DAY),
    DATEDIFF('Table'[Submit Date],'Table'[Closed Date],DAY) ))
return
SWITCH(
    TRUE(),
    _if>=0&&_if<=7,"0-7Days",
    _if>7&&_if<=15,"Is>7Days",
    _if>15&&_if<=30,"Is>15Days",
    "Is>30Days")

vyangliumsft_0-1724207619931.png

2. Enter data – Table.

vyangliumsft_1-1724207619933.png

3. Because the default Power BI sorting is alphabetical, in order to prevent the appearance of the sorting does not meet your requirements, we can sort according to [Index] to sort.

vyangliumsft_2-1724207661340.png

4. Create measure.

Measure =
SWITCH(
    TRUE(),
    MAX('Table2'[Group]) = "Created",COUNTX(FILTER('Table','Table'[Submit Date]<>BLANK()),[Domain]),
    MAX('Table2'[Group]) = "Closed",COUNTX(FILTER('Table','Table'[Status]="Resolved"),[Domain]),
    MAX('Table2'[Group]) = "In Progress",COUNTX(FILTER('Table','Table'[Status]="Implementation In Progress"),[Domain]),
    COUNTX(
        FILTER('Table',
        'Table'[Ageing]=MAX('Table2'[Group])),[Ageing]))

5. Result:

vyangliumsft_3-1724207661347.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hi , Any help the below request. Thanks!

Hi ,

 

Thank you so much for  your help and one more help  below screen shot it is showing total count of P1&P2 tickets but here I need to show MTD One status, Last 7 Das Status and Last 24 Hours status. how we can create. Thank you!

 

 

Pavani_0-1724273919276.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.