3 Replies Latest reply: Nov 3, 2015 5:26 AM by Gysbert Wassenaar

# Multiple criteria in set analysis

Hello,

I want to use set analysis to show a KPI.

The KPI is calculated by deviding "A" and "B" Where "A" = a count of all ProcessSteps of a certain type and B is al Subjects where IsProcess = 1.

The dimension is 'weeks' so for each week you have a KPI in a chart so you can see the trend.

I'm doing this with the following set analysis wich works fine as far as i can see:

count({\$<Item_Type={"TypeA","TypeB","TypeD"}>}Step_ProcessStepID) / Count({\$<Subject_IsProcess={1}>}Subject_IsProcess)

But now I want to show the KPI for the current week in a KPI indicator. I'm having trouble making the above set analysis only for the current week. I only have the date for each item in the source data.

Can anyone help me out with this?

Sorry for my crapy English...

Regards Twan

• ###### Re: Multiple criteria in set analysis

Assuming the current week is also the maximum week in your data:

count({\$<Weeks={\$(=max(Weeks))},Item_Type={"TypeA","TypeB","TypeD"}>}Step_ProcessStepID) / Count({\$<Weeks={\$(=max(Weeks))},Subject_IsProcess={1}>}Subject_IsProcess)

• ###### Re: Multiple criteria in set analysis

This one doesn't work, but maybe I convert it the wrong way...

This is my original set analysis to calculate the KPI:

count({\$<Step_Type={"Beslissing","Taak","Email uit"}>}Step_ProcessStepID)/Count({\$<Subject_IsProcess={1}>}Subject_IsProcess)

This is my original set analysis to convert into week for the cart:

Week(Datum)

Sow I only have the date (Datum) and i convert that into the week.

I tried your suggestion and came up with this:

count({\$<Week(Datum)={\$(=max(Week(Datum)))},Step_Type={"Beslissing","Taak","Email uit">}Step_ProcessStepID)/Count({\$<Week(Datum)={\$(=max(Week(Datum)))},Subject_IsProcess={1}>}Subject_IsProcess)

That doesn't work

• ###### Re: Multiple criteria in set analysis

Yes, you can only use fields, not calculated dimensions. But this should work:

count({\$<Datum={">=\$(=WeekStart(Max(Datum)))<=\$(=WeekEnd(Max(Datum)))"},Step_Type={"Beslissing","Taak","Email uit">}Step_ProcessStepID)/Count({\$<Datum={">=\$(=WeekStart(Max(Datum)))<=\$(=WeekEnd(Max(Datum)))"},Subject_IsProcess={1}>}Subject_IsProcess)