Hi everyone,
Quite new to PowerPivot here and I'm having quite a number of issues - especially wrt. DAX.
A little background: We have a data warehouse with all changes to cases, such that a case has, e.g., a department, a case handler, a timekey, a subjectgroup etc. For each CaseID there are n different instances in the FactCases table, each with a Revision nr and a status (Open/Closed .. + some more I'll ignore here).
What I currently need to do is:
1. Determine the average completion time (time to progress from 1st Open to Closed status) for all cases.
.. or, if possible, even better:
2. Determine the average completion time per department, but not per case handler or per case.
I've slightly given up on nr. 2 after fiddling with ALL and ALLExcept for what felt like ages. But I thought I had nr 1 down with this:
=CALCULATE(AVERAGE(FactCases[CompletionTime]); ALL('FactCases'); FILTER(FactCases; FactCases[Status] = "Closed"))
However that doesn't work. The Filter seems to cancel ALL.. I also tried with ALLEXCEPT, with Status added as an exception. Didn't work either.
Basically what should have resulted in a fixed value becomes dependent on the CaseID in the PivotTable. And some cases aren't closed, so for those it becomes a blank value.
Any ideas?
Quite new to PowerPivot here and I'm having quite a number of issues - especially wrt. DAX.
A little background: We have a data warehouse with all changes to cases, such that a case has, e.g., a department, a case handler, a timekey, a subjectgroup etc. For each CaseID there are n different instances in the FactCases table, each with a Revision nr and a status (Open/Closed .. + some more I'll ignore here).
What I currently need to do is:
1. Determine the average completion time (time to progress from 1st Open to Closed status) for all cases.
.. or, if possible, even better:
2. Determine the average completion time per department, but not per case handler or per case.
I've slightly given up on nr. 2 after fiddling with ALL and ALLExcept for what felt like ages. But I thought I had nr 1 down with this:
=CALCULATE(AVERAGE(FactCases[CompletionTime]); ALL('FactCases'); FILTER(FactCases; FactCases[Status] = "Closed"))
However that doesn't work. The Filter seems to cancel ALL.. I also tried with ALLEXCEPT, with Status added as an exception. Didn't work either.
Basically what should have resulted in a fixed value becomes dependent on the CaseID in the PivotTable. And some cases aren't closed, so for those it becomes a blank value.
Any ideas?