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
redsailbi
Frequent Visitor

How to get total open ticket counts till specific date?

Hi Folks,
I have been suffering to get the correct Open Ticket counts for specific dates. I need to show total open ticket trend with line chart. We need all the tickets which are created and not closed on specific date.
Even tickets created and closed on the same date that should be consider as open tickets.
Below is the relation I am have.

 

These are my measures:-

Cases Created = DISTINCTCOUNT(Incident[ticketnumber])
Cases Resolved = CALCULATE(Incident[Cases Created],USERELATIONSHIP('Date'[Date],Incident[Day Completed]))
Cases Calculation = [Cases Created] - [Cases Resolved]
Total_Open_Tickets =IF (ISBLANK ( [Cases Created] ) && ISBLANK ( [Cases Resolved] ),BLANK (),
CALCULATE ([Cases Calculation],FILTER (ALL ( 'Date' ),'Date'[Date] <= MIN ( 'Date'[Date] )&& 'Date'[Date] <> BLANK ())))

We have also tried other community links but didn't get a solution.
Capture.PNG

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @redsailbi ,

Whether your problem has been resolved? If yes, could you please mark the post as Answered? It will help the others in the community find the solution easily if they face the same problem with you.  Thank you.

Otherwise, you can create a measure as below to get the count of open cases over time:

 

Count of Open cases =
VAR _curdate =
    SELECTEDVALUE ( 'Date'[Date] )
VAR _opencases =
    CALCULATE (
        DISTINCTCOUNT ( Incident[ticketnumber] ),
        ALL ( Date ),
        'Date'[Date] <= _curdate,
        ISBLANK ( Incident[Day Completed] )
            || Incident[Day Completed] >= _curdate
    )
RETURN
    _opencases

 

In addition, you can refer the content in the following links to achieve it.

Count of Open or Closed items based on 2 different Date Columns

Calculate OPEN CASES over time in Power BI

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

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.