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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I
Helper I

Average of Datediff with a condition

Hi there,

I have a very common business use case which I handled in M/Power Query but I'm struggling to efficiently process it in Dax.


I have a list of Jira tickets with start and end dates. I want to know for every month how many Jira tickets were opened and what the average ticket age was at this point in time.


For instance, a ticket is opened in March and closed in April, so it should count as open in March with an age on 1 month, April with an age of 2 months and it should not appear any longer in the calculation from May on.


The final output will be a time-series with the months in x-axis and the average ticket lifetime and the number of tickets in y-axis.


Would you have any clue wrt how to process this business case please ?


Thanks in advance,


Helper I
Helper I

Helper I
Helper I

For those looking for an answer, this one is just on point :

Super User
Super User

@nicplancho You can refer these videos, these might help you:

Power BI: HR Analytics - Employees as on Date :
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees:

If you find this insightful, please provide a Kudo and accept this as a solution.

Super User
Super User

Hi @nicplancho 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Please show the expected outcome based on the sample data you provided.

Rita Fainshtein | Microsoft MVP
Blog :

Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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