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

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.

Reply
Douttful
Helper I
Helper I

Table for count of open tickets by day

Hello! 

 

I would like to be able to show the number of tickets open each day in a table. (see below)

 

I am very close, but for some reason the column in my visual will either show a total count or nothing. 

Douttful_0-1679944258554.png

 

There are 3 tables being used in this visual 

 

Table: Calendar

Includes the following columns: Date, Period Number, Fiscal Year, Ween Number, WeekIndex, PeriodIndex, YearIndex

 

Table: Live L1 Tickets 

Columns: INCIDENT_NUMBER, Submit_date_time, Last_Resolved_date_time, Period Number (and many more but I don't think they are needed) 

 

Table: Period Filter Slicer

Columns: Period Number, Period Start Date, Period End Date 

 

The tables are related by the Period Number column (below): 

Table Name ColumnRelated Table Column
Period Filter Slicer[Period Number]Live L1 Tickets[Period Number]
Period Filter Slicer[Period Number]Calendar[Period Number]

 

  • The Live L1 Ticket table and the Calendar table are not related. When I tried to relate them, it showed Many to Many and would not let me save. 

 

Here's the measures I have currently: 

Measure =
VAR _TableCount = COUNTROWS('Live L1 Tickets')

RETURN
CALCULATE( _TableCount,
FILTER(ALL('Live L1 Tickets'),
'Live L1 Tickets'[Submit_date_time] <= MAX('Calendar'[Date])
&& 'Live L1 Tickets'[Last_Resolved_date_time]> MIN('Calendar'[Date])
))
  •  This measure does not return any data. 
 
Measure 3 =
    CALCULATE(
        COUNT('Live L1 Tickets'[INCIDENT_NUMBER])
        , 'Live L1 Tickets'[Submit_date_time] <= MAX('Calendar'[Date])
        && ('Live L1 Tickets'[Last_Resolved_date_time] > MAX('Calendar'[Date]) || ISBLANK('Live L1 Tickets'[Last_Resolved_date_time]))
    )
  • This measure returns a total count and not a count of the number of tickets that were open that day. 

 

Example of what I am trying to get: 

 

Below is an example Live L1 Ticket table data. 

INCIDENT_NUMBERSubmit_date_timeLast_Resolved_date_timePeriod Number
1234563/24/2023 12:00 PM3/27/2023 10:00 AM2023-02
1234573/24/2023 1:00 AM3/24/2023 8:00 AM 

2023-02

1235673/26/2023 6:00 PM 2023-02
1254633/23/2023 2:00 PM3/23/2023 2:00 PM2023-02
 
With this pretend data, I want to show this pretend table: 
DateOpen Tickets
3/23/20230
3/24/20231
3/25/20231
3/26/20232
3/27/20231

 

Because some tickets were opened, and some tickets were resolved, the counts stay the same for most days. But it still shows a count of how many were opened, and stayed open on that day. 

 

 

Thank you to anyone who assists! 

1 REPLY 1
Douttful
Helper I
Helper I

This works, But ONLY if I have the date filter set for a relative date. I wanted to utilize filters to expand or drill down the table. 

 

Is that asking too much of PBI? 

Douttful_0-1680007960055.png

 

 

 

 

Measure 3 =
VAR _DAY = MAX('Calendar'[Date])

RETURN

    COUNTROWS(
        FILTER('Live L1 Tickets',
        VAR _Resolved_DT =
            IF(
                ISBLANK('Live L1 Tickets'[Last_Resolved_date_time]),
                DATE(9999, 12, 31),
                'Live L1 Tickets'[Last_Resolved_date_time]
            )

            RETURN
            'Live L1 Tickets'[Submit_date_time]<= _DAY && _DAY < _Resolved_DT
        )
    )+0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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