Forum Discussion
Case Backlog Age
- 8 years ago
Ok, I made some small changes to my code to account for Cases opening on Month End, but in general the AllSelected worked... Remember to create a new Table with Month Start and Month End, and use this 'Months' table to create new Columns to calculate your timeframe values.
** New Column on your Case Table **
Adj_CloseDate = IF (ISBLANK(Table1[EffectiveClosedDate__c]), TODAY(),IF(Table1[EffectiveClosedDate__c] < Table1[CreatedDate],Table1[CreatedDate],Table1[EffectiveClosedDate__c]))
** All these columns go on the Months (open & Close) table.
<60 = CALCULATE(COUNT(Table1[CaseNumber]), FILTER(ALLSELECTED(Table1),
Table1[CreatedDate] <= tbl_Months[EndOfMonth] && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth],Table1[Adj_CloseDate]),DAY) < 60 && Table1[Adj_CloseDate] >= tbl_Months[EndOfMonth]))60-120 = CALCULATE(COUNT(Table1[CaseNumber]), FILTER(ALLSELECTED(Table1),
Table1[CreatedDate] <= tbl_Months[EndOfMonth] && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth],Table1[Adj_CloseDate]),DAY) >= 60 && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth] , Table1[Adj_CloseDate]),DAY) < 120 && Table1[Adj_CloseDate] >= tbl_Months[EndOfMonth]))120-180 = CALCULATE(COUNT(Table1[CaseNumber]), FILTER(ALLSELECTED(Table1),
Table1[CreatedDate] <= tbl_Months[EndOfMonth] && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth],Table1[Adj_CloseDate]),DAY) >= 120 && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth] , Table1[Adj_CloseDate]),DAY) < 180 && Table1[Adj_CloseDate] >= tbl_Months[EndOfMonth]))>180 = CALCULATE(COUNT(Table1[CaseNumber]), FILTER(ALL(Table1),
Table1[CreatedDate] <= tbl_Months[EndOfMonth] && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth],Table1[Adj_CloseDate]),DAY) >= 180 && Table1[Adj_CloseDate] >= tbl_Months[EndOfMonth]))** for the purpsoe of the screen shot, >180 is set to >90 since this is all pretty recent data...
Hmmm... Replacing ALL with ALLSELECTED does not seem to alter the data any. It seems that any filters from the Case table that I add to the chart are still being ignored. Is there some sort of relationship I need to establish between these tables for it to work properly?
Sorry for all the questions, I am so close here I just have been looking at this for days now :)
Try ALLEXCEPT. If that doesnt work, can you post a sample of yourdata with the additional filtered rows so i can duplicate on my end?
- Rmilczarek8 years agoHelper I
Sadly ALLEXCEPT didn't seem to budge the data either. I'll get a sample of the data together to attach but in the meantime, here is the method I am using to determine the Backlog for the months in question. I have verified this matches the actual backlog, so I know this method is accurate. Is there any way to add this type of formula/setup to "define" the parameters of a Backlog Age by Month report?
Here is what I used for Backlog:
Backlog - Monthly = CALCULATE('Case'[Backlog],FILTER(ALL('Calendar'),'Calendar'[Date]<=MIN('Calendar'[Date])))
Shared Axis is defined on the Calendar table I made as Monthly = FORMAT('Calendar'[Date],"YYYY/mm")
Again, I'll get some sample data together and thanks for all of your help!
- Rmilczarek8 years agoHelper I
Sorry, I ran into some data issues getting an export. I will get something uploaded soon.
- Rmilczarek8 years agoHelper I
Here is some sample data. The filters would be ProblemNumber is Blank, RecordTypeID is 1449000xWW and AutoTeam is Not CC
CreatedDate EffectiveClosedDate__c CaseNumber AutoTeam__c ProblemNumber__c RecordTypeId 8/31/2017 0:00 8/31/2017 0:00 10-000 AMER-SH 1449000xWW 8/2/2017 0:00 8/3/2017 0:00 10-000 AMER-SSM-Core 1449000xWW 8/8/2017 0:00 8/8/2017 0:00 10-000 AMER-SSM-Core 1449000xWW 9/14/2017 0:00 10/4/2017 0:00 10-000 AMER-SSM-Dist 1449000xWW 8/14/2017 0:00 8/14/2017 0:00 10-000 CSO-MGR 1449000xWW 8/18/2017 0:00 8/18/2017 0:00 10-000 EMEA-AS 1449000xWW 9/20/2017 0:00 10/4/2017 0:00 10-000 EMEA-AS 1449000xWW 9/27/2017 0:00 9/27/2017 0:00 10-000 EMEA-SD 1449000xWW 10/3/2017 0:00 10/4/2017 0:00 10-000 EMEA-SSM-PL 1449000xWW 10/9/2017 0:00 10-000 EMEA-SSM-PL 1449000xWW 8/14/2017 0:00 8/14/2017 0:00 10-001 AMER-SD 22x 1449000xWW 9/20/2017 0:00 9/25/2017 0:00 10-001 AMER-SH xx221 9/8/2017 0:00 9/8/2017 0:00 10-001 AMER-SSM-Asset 1449000xWW 8/2/2017 0:00 8/23/2017 0:00 10-001 AMER-SSM-Core 1449000xWW 8/18/2017 0:00 9/1/2017 0:00 10-001 AMER-SSM-Core 1449000xWW 9/14/2017 0:00 9/27/2017 0:00 10-001 AMER-SSM-Dist 1449000xWW 10/3/2017 0:00 10-001 AMER-SSM-Sec 1449000xWW 8/24/2017 0:00 8/29/2017 0:00 10-001 AMER-WL 1449000xWW 10/9/2017 0:00 10/9/2017 0:00 10-001 AMER-WL 1449000xWW 8/31/2017 0:00 9/7/2017 0:00 10-001 CC 1449000xWW 7/27/2017 0:00 8/4/2017 0:00 10-001 EMEA-SD 1449000xWW 9/27/2017 0:00 9/27/2017 0:00 10-001 EMEA-SD 1449000xWW 7/5/2017 0:00 8/8/2017 0:00 10-001 EMEA-SSM-PL 1449000xWW 8/14/2017 0:00 8/21/2017 0:00 10-002 AMER-SSM-Asset 1449000xWW 8/2/2017 0:00 8/2/2017 0:00 10-002 AMER-SSM-Core 22x 1449000xWW 8/18/2017 0:00 8/21/2017 0:00 10-002 AMER-SSM-Dist 1449000xWW 9/20/2017 0:00 9/20/2017 0:00 10-002 AMER-SSM-Sec 1449000xWW 9/14/2017 0:00 9/15/2017 0:00 10-002 EMEA-AS 1449000xWW 8/31/2017 0:00 10-002 EMEA-AS 1449000xWW 8/8/2017 0:00 9/6/2017 0:00 10-002 EMEA-SSM-PL 1449000xWW 10/3/2017 0:00 10-002 EMEA-SSM-PL 1449000xWW 10/9/2017 0:00 10-002 EMEA-SSM-PL 1449000xWW 10/9/2017 0:00 10/11/2017 0:00 10-003 AMER-SD 1449000xWW 8/24/2017 0:00 8/24/2017 0:00 10-003 AMER-SH 1449000xWW 9/14/2017 0:00 9/18/2017 0:00 10-003 AMER-SSM-Asset xx221 8/18/2017 0:00 10/6/2017 0:00 10-003 AMER-SSM-Core 1449000xWW 9/8/2017 0:00 9/11/2017 0:00 10-003 AMER-SSM-Dist 1449000xWW 9/20/2017 0:00 9/29/2017 0:00 10-003 AMER-SSM-Sec 1449000xWW 8/31/2017 0:00 9/1/2017 0:00 10-003 CC 1449000xWW 8/14/2017 0:00 8/14/2017 0:00 10-003 CSO-MGR 1449000xWW 7/21/2017 0:00 8/18/2017 0:00 10-003 EMEA-AS 1449000xWW 7/27/2017 0:00 8/29/2017 0:00 10-003 EMEA-AS 1449000xWW 8/2/2017 0:00 8/28/2017 0:00 10-003 EMEA-SSM-PL 1449000xWW 10/3/2017 0:00 10/9/2017 0:00 10-003 EMEA-SSM-PL 1449000xWW 8/2/2017 0:00 8/11/2017 0:00 10-004 AMER-SH 1449000xWW 8/18/2017 0:00 8/18/2017 0:00 10-004 AMER-SH 1449000xWW 10/9/2017 0:00 10-004 AMER-SH 1449000xWW 8/8/2017 0:00 8/10/2017 0:00 10-004 AMER-SSM-Asset 1449000xWW 8/31/2017 0:00 8/31/2017 0:00 10-004 AMER-SSM-Core 1449000xWW 9/14/2017 0:00 9/15/2017 0:00 10-004 AMER-SSM-Dist 1449000xWW - fhill8 years agoResident Rockstar
Ok, I made some small changes to my code to account for Cases opening on Month End, but in general the AllSelected worked... Remember to create a new Table with Month Start and Month End, and use this 'Months' table to create new Columns to calculate your timeframe values.
** New Column on your Case Table **
Adj_CloseDate = IF (ISBLANK(Table1[EffectiveClosedDate__c]), TODAY(),IF(Table1[EffectiveClosedDate__c] < Table1[CreatedDate],Table1[CreatedDate],Table1[EffectiveClosedDate__c]))
** All these columns go on the Months (open & Close) table.
<60 = CALCULATE(COUNT(Table1[CaseNumber]), FILTER(ALLSELECTED(Table1),
Table1[CreatedDate] <= tbl_Months[EndOfMonth] && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth],Table1[Adj_CloseDate]),DAY) < 60 && Table1[Adj_CloseDate] >= tbl_Months[EndOfMonth]))60-120 = CALCULATE(COUNT(Table1[CaseNumber]), FILTER(ALLSELECTED(Table1),
Table1[CreatedDate] <= tbl_Months[EndOfMonth] && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth],Table1[Adj_CloseDate]),DAY) >= 60 && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth] , Table1[Adj_CloseDate]),DAY) < 120 && Table1[Adj_CloseDate] >= tbl_Months[EndOfMonth]))120-180 = CALCULATE(COUNT(Table1[CaseNumber]), FILTER(ALLSELECTED(Table1),
Table1[CreatedDate] <= tbl_Months[EndOfMonth] && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth],Table1[Adj_CloseDate]),DAY) >= 120 && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth] , Table1[Adj_CloseDate]),DAY) < 180 && Table1[Adj_CloseDate] >= tbl_Months[EndOfMonth]))>180 = CALCULATE(COUNT(Table1[CaseNumber]), FILTER(ALL(Table1),
Table1[CreatedDate] <= tbl_Months[EndOfMonth] && DATEDIFF(Table1[CreatedDate], IF(Table1[Adj_CloseDate] > tbl_Months[EndOfMonth], tbl_Months[EndOfMonth],Table1[Adj_CloseDate]),DAY) >= 180 && Table1[Adj_CloseDate] >= tbl_Months[EndOfMonth]))** for the purpsoe of the screen shot, >180 is set to >90 since this is all pretty recent data...
- Rmilczarek8 years agoHelper I
Ugh. I tried just starting fresh with a new table for Cases and building the Month table. But now when I put in the columns in the Month table for the ranges, I am getting the "In DATEDIFF function, the start date cannot be greater than the end date" error in every one.
These did not error out in my other report so I am not sure what is different now. Here are my columns (adjusted for column names):
>180 = CALCULATE(COUNT('Cases'[CaseNumber]), FILTER(ALL('Cases'),
'Cases'[CreatedDate] < 'Month'[MonthEnd] && DATEDIFF('Cases'[CreatedDate], IF('Cases'[Adj_CloseDate] > 'Month'[MonthEnd], 'Month'[MonthEnd],'Cases'[Adj_CloseDate]),DAY) >= 180 && 'Cases'[Adj_CloseDate] > 'Month'[MonthEnd]))Adj_CloseDate = IF (ISBLANK('Cases'[EffectiveClosedDate__c]), TODAY(),IF('Cases'[EffectiveClosedDate__c] < 'Cases'[CreatedDate],'Cases'[CreatedDate],'Cases'[EffectiveClosedDate__c]))
Could something be wrong with the latest data pull?
- Rmilczarek8 years agoHelper I
Sorry, it seems something was wrong with that data pull because I refreshed it and now I don't see errors on those columns. However, regarding filtering, the chart still seems to be ignoring any filter I add if that filter a field on the Cases table. Is there something I am supposed to do to get the Month table to recognize fitlers I set on the Cases table?
- scotton4 years agoFrequent Visitor
Hi there. I just transformed those columns (<29...) to measure and switched
'tbl_Months[EndOfMonth]' to MAX(tbl_Months[EndOfMonth])
Now I can filter freely.