Sum Aggr and Count with Multiple If Else Conditions
Good Day All,
I am working on store related data and i have to calculate compliance on each visit for a KPI but the problem is we have different store types with different criteria applied on it.
I have write below expression but there is some mistake in it, can you please help me out where i am making the mistake.
sum(aggr( If(count (distinct if (Parameter='KPI-1' and Compliance='C' and Store_Type<>'Cosmetics',Category) )>=5,1,if(Parameter='KPI-1' and Compliance='C' and Store_Type='Cosmetics',Category)>=2,1) ,Visit,Compliance))