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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
qs1365
New Member

Creating Open Tickets / Backlog Evolution Measure & Graph Visual

Hello everyone, I am trying to replicate a Service Now monthly average incident backlog in Power BI, however the measure i have created to count the number of open tickets doesn't return the right amount of tickets. 

 

I have a Date table and an Incidents table with deactivated relationships between Date[Date] and Incidents[opened_at], Incidents[resolved_at].

The Date format is the same in all 3 columns, I have removed the timestamps.

 

In Service Now the measure created in Analytics is the distinct count of open tickets with a not canceled state :

Opened on Today .or. Opened < 2025-02-12 00:00:00 .and. Resolved is empty .or. Resolved > 2025-02-12 23:59:59 .and. State != Canceled

 

The measure i have created is below, when i try to show the value in a monthly graph the values shown are wrong, and i do not understand what the problem is. Does anyone have any idea on how to solve this?

 

Open Incidents (DistinctCount) =
VAR SelectedDate =
    MAX('Date'[Date])
RETURN
CALCULATE(
    DISTINCTCOUNT(Incidents[number]),
 
    Incidents[opened_at] <= SelectedDate,
 
    Incidents[resolved_at] > SelectedDate
        || ISBLANK(Incidents[resolved_at]),
 
    Incidents[state] <> "Canceled",
 
    USERELATIONSHIP('Date'[Date], Incidents[opened_at])
)
 
2 ACCEPTED SOLUTIONS
InsightsByV
Super User
Super User

Hi,

Can you try this?

Open Incidents =
VAR SelectedDate = MAX('Date'[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(Incidents[number]),
FILTER(
ALL(Incidents),
Incidents[opened_at] <= SelectedDate
&&
(
ISBLANK(Incidents[resolved_at]) ||
Incidents[resolved_at] > SelectedDate
)
&&
Incidents[state] <> "Canceled"
)
)

View solution in original post

Kedar_Pande
Super User
Super User

@qs1365 

Measure

Open Incidents (DistinctCount) = 
VAR SelectedDate = MAX('Date'[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(Incidents[number]),
Incidents[opened_at] <= SelectedDate,
OR(
ISBLANK(Incidents[resolved_at]),
Incidents[resolved_at] > SelectedDate
),
Incidents[state] <> "Canceled",
ALL('Date')
)

ALL('Date') prevents slicer from filtering opened_at/resolution dates. Counts tickets open as of SelectedDate.

View solution in original post

6 REPLIES 6
v-sathmakuri
Community Support
Community Support

Hi @qs1365 ,

 

Could you please let us know if you still have any issues?

Thanks!!

v-sathmakuri
Community Support
Community Support

Hi @qs1365 ,

 

Thanks @wardy912 , @Kedar_Pande , @cengizhanarslan  and @InsightsByV  for the prompt respone.

I hope above provided solution helped in resolving the issue. If you have anything else to check we would be happy to address.

Thanks!!

wardy912
Super User
Super User

Hi @qs1365 

This is the measure that I use for your exact request, ticket backlog in ServiceNow

Incident Backlog = 
VAR CurrentDate = MAX('Date'[Date])
VAR ActiveTickets =
CALCULATE(DISTINCTCOUNT(Incidents[Number]),
ALL('Date'),
'Date'[Date]<=CurrentDate,
ISBLANK(Incidents[Resolved Date])
||Incidents[Resolved Date]>=CurrentDate)
Return
ActiveTickets

 

--------------------------------

I hope this helps, please give kudos and mark as solved if it does!

 

Connect with me on LinkedIn.

Subscribe to my YouTube channel for Fabric/Power Platform related content!

Kedar_Pande
Super User
Super User

@qs1365 

Measure

Open Incidents (DistinctCount) = 
VAR SelectedDate = MAX('Date'[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(Incidents[number]),
Incidents[opened_at] <= SelectedDate,
OR(
ISBLANK(Incidents[resolved_at]),
Incidents[resolved_at] > SelectedDate
),
Incidents[state] <> "Canceled",
ALL('Date')
)

ALL('Date') prevents slicer from filtering opened_at/resolution dates. Counts tickets open as of SelectedDate.

cengizhanarslan
Super User
Super User

Please try the measure below:

Open Incidents =
VAR _SelectedDate =
    MAX ( 'Date'[Date] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( Incidents[number] ),
        REMOVEFILTERS ( Incidents ),
        Incidents[opened_at] <= _SelectedDate,
        Incidents[resolved_at] > _SelectedDate
            || ISBLANK ( Incidents[resolved_at] ),
        Incidents[state] <> "Canceled"
    )
_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.
InsightsByV
Super User
Super User

Hi,

Can you try this?

Open Incidents =
VAR SelectedDate = MAX('Date'[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(Incidents[number]),
FILTER(
ALL(Incidents),
Incidents[opened_at] <= SelectedDate
&&
(
ISBLANK(Incidents[resolved_at]) ||
Incidents[resolved_at] > SelectedDate
)
&&
Incidents[state] <> "Canceled"
)
)

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.