Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Avg weekly tickets solved by team

Having issues getting this calcuation to work as expected 

 

here is a basic look at my data

 

 

I'm trying to count the unique agent_id per date, then sum by week. 

so for example the count of agent id's 11/-11/5 for the above data should be 15

 

 

I was trying this but not successful at getting the right number

Tickets Solved per Agent/day weekly = ([ticket_id] / COUNT('Date'[Date].[Date]))/[headcount]
headcount = CALCULATE(count(dataset[agent_id]), ALLSELECTED(dataset))
 
anyone have an idea of how I can count agents by day where the count the agents who have tickets > 0  and then sum by week?

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Refer:

    count_ = calculate(distinctcount([agent_id]),allexcept('table',[date]))
    sumbyweek = SUMX(FILTER(ALL('Table'),WEEKNUM([date])=weeknum(SELECTEDVALUE([date]))),[count_])

     

    Best Regards,

    Jay

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks Jay, 

     

    running into issues as I have a date table, which I populate weekending. going to have to try and rework this a bit and see if I can make it work