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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
loverlin
Frequent Visitor

Count of tickets unresolved (open) on each date-Snapshot of past dates

I am hoping this is posible with Dax in Power BI. I am hoping for some help here as those I have talked to have not been able to help.

I have a table called SystemTickets

SystemTickets TableSystemTickets Table

I need to create a visual that counts unresolved tickets on specific dates, a snapshot of past dates if you will. I would be able to select a past date and get a count of how many tickets were unresolved (Open). I need to be able to show in a line chart the dates and a count of tickets that were unresolved on each of those dates. 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I suggest having a disconnected calendar table like below picture, and please write the measure like below.

 

please check the below picture and the attached pbix file.

 

Picture1.png

 

Unresolved tickets count: =
CALCULATE (
    COUNTROWS ( VALUES ( Data[IDNumber] ) ),
    FILTER (
        Data,
        Data[OpenDate] <= MAX ( 'Calendar'[Date] )
            && OR (
                Data[ResolvedDate] >= MIN ( 'Calendar'[Date] ),
                Data[ResolvedDate] = BLANK ()
            )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I suggest having a disconnected calendar table like below picture, and please write the measure like below.

 

please check the below picture and the attached pbix file.

 

Picture1.png

 

Unresolved tickets count: =
CALCULATE (
    COUNTROWS ( VALUES ( Data[IDNumber] ) ),
    FILTER (
        Data,
        Data[OpenDate] <= MAX ( 'Calendar'[Date] )
            && OR (
                Data[ResolvedDate] >= MIN ( 'Calendar'[Date] ),
                Data[ResolvedDate] = BLANK ()
            )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Tutu_in_YYC
Super User
Super User

Hi Loverlin,

 

Let me know if this works for you.

Step 1:
Remove time stamps in both OpenDate and ResolvedDate. Do this in Power Query, as changing data type in Power BI desktop may just hide the time, not completely remove it. Make sure they have date type.

 

Step 2:
All the blanks in ResolvedDate have to be replaced with a date that is waaaayyy in the future. i.e 1/1/2099
We can do this by replace value of blank in Power Query with that date. 

Step 3:
You must have another date table that you can use to choose a past date. Lets call this table Calendar and the column in there is PastDate. This table must have no relationship with any table. You can use DAX to create a date table.
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Step 4:
Create a slicer with PastDate

 

Step 5:
Write this measure:

 

No of Unresolved Tickets =
VAR SelectedPastDate = SELECTEDVALUE( Calendar[PastDate])
RETURN

CALCULATE(
DISTINCTCOUNTNOBLANK
( SystemTickets[IDNumber]),
FILTER(
SystemTickets,
SystemTickets[OpenDate] <= SelDate &&
SystemTickets[ResolvedDate]SelDate
)
)


Step 6:
Create the line chart and use the above measure and PastDate as axis

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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