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
Anonymous
Not applicable

DAX Measure for open tickets by day

Hi all, I am trying to develop a DAX measure to show open tickets per day. 

I would think to use the resolved column that has dates on when the ticket was resolved. 

I have a date calendar table set up with a relation with created and resolved date connected. 

 

In my head I see the count of tickets that are open without a resolved date (blank in the cell) on a specific day. 

 

Please let me know if I can provide more details to clarify my ask. Thank you!

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Open Tickets =
var maxDate = MAX('Date'[Date])
return CALCULATE(COUNTROWS('Table'), REMOVEFILTERS('Date'), 
'Table'[created date] <= maxDate &&
( 'Table'[resolved date] > maxDate || ISBLANK('Table'[resolved date])
)

View solution in original post

4 REPLIES 4
kendra
Frequent Visitor

@johnt75 - I was trying to use your solution but I am getting an error message. Do you know what I may need to change to get the formula to work? I am not very knowledgable about DAX.

Capture1.JPGCapture2.JPG

Try changing it to

Open Tickets =
var maxDate = MAX('Date'[Date])
return CALCULATE(COUNTROWS('Table'), REMOVEFILTERS('Date'), 
'Table'[created date] <= maxDate ,
( 'Table'[resolved date] > maxDate || ISBLANK('Table'[resolved date])
)

This splits the date clauses into separate conditions.

@johnt75  THANK YOU!!!!! That worked. I really appreciate you taking the time to help.

johnt75
Super User
Super User

Open Tickets =
var maxDate = MAX('Date'[Date])
return CALCULATE(COUNTROWS('Table'), REMOVEFILTERS('Date'), 
'Table'[created date] <= maxDate &&
( 'Table'[resolved date] > maxDate || ISBLANK('Table'[resolved date])
)

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.