Skip to main content

When I put only formula for 'no-touch' rate is shows correct value (if 1 out of 3 cases meets criteria then it returns 33%). But if I add no of activities (total: 37) it changes to 46% (calculates no of activities within case that fulfils criteria and divides by all). Any tips how to come up with no of activities (37) in column A and correct ratio per case (33%) in B? Thanks in advance for any guidelines.

 

***

 

AVG(

 CASE

  WHEN PU_COUNT("VBAP","_CEL_O2C_ACTIVITIES"."USER_TYPE","_CEL_O2C_ACTIVITIES"."USER_TYPE" IN ('A','B','C') 

  AND "_CEL_O2C_ACTIVITIES"."ACTIVITY_EN" IN ('X','Y','Z')) = 0  

  THEN 1.0

  ELSE 0.0

 

***

Case A # of Activities No Touch

A 17 yes

B 10 no

C 10 no

 

Hey Lukasz,

I think you want to make an OLAP with CASE as dimension. If you do that then the formula you provided will calculate no touch within the activities involved in the particular case. In simpler words, the dimension of OLAP is the 'GROUP BY' equivalent of SQL.

If you want a kpi of % of no touch of all cases, and want it to use in an OLAP where case is a dimension, create a variable using the PQL provided above in the OLAP. Add the no of activities as usual in the OLAP.Screenshot 2024-02-12 at 3.24.40 PMHope it solves your issue.

 


Reply