Forum Discussion
Count if Accumulation
hi, trying to do a if statement then a count statement to calculate how long customer case items took to close
Currently created a date diff on the difference in days for items between Created Date and Closed Date. Output is in days
then i am forming an if statement to mark items in a new column based on the date ranges
where i have failed is trying to put this into a count if statement or separate calculation
i am trying to calculate if the "Days to close" is marked as "2. < 1 week" then count everything marked with that field and also "1. < 1 day" as i truely want to calculate the totals that fall under each category. not just in that range (IF THAT MAKES SENSE)
so if i want to count, how many items close within 30 days, i want it to count up outputs 1, 2 and 3
hopefully make some sense
Hi Anonymous ,
Create a measure as below:
Measure = CALCULATE(COUNTROWS('Escalation'),FILTER(ALL(Escalation),'Escalation'[Column]<=MAX('Escalation'[Column])&&'Escalation'[Priority]=MAX('Escalation'[Priority])))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
4 Replies
- amitchandakSuper User
Anonymous , for that you can create whatif parameter and use
measure =
var _par = maxx(allselected(parameter), parameter[parameter])
return
calculate(count(Table[customer]), filter(Table, Table[Days to Close] <=_par))- AnonymousNot applicable
thanks for reply amitchandak
not sure if whatif will help me table-ise the outputs as per below
couldnt put a table in this reply, getting errors
but essentially need to put the outputs in a table with the below in columns
< 1 day = count of items less than 1 day
< 1 week = Count of items less than 7 days including items in the less than 1 day column
<1 month = Count of items less than 30 days including items in the less than 1 day and less than week column
etc etcthe below is how i want the output where by 65 is actually the sum of 9 + 65
- v-kelly-msftCommunity Support
Hi Anonymous ,
Create a measure as below:
Measure = CALCULATE(COUNTROWS('Escalation'),FILTER(ALL(Escalation),'Escalation'[Column]<=MAX('Escalation'[Column])&&'Escalation'[Priority]=MAX('Escalation'[Priority])))And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!