Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ABP2021
Contributor II
Contributor II

Contribution calculation

Hello Friends,

can any one tell me how to achieve below req-

i have to show HQ wise contribution and there grouping like Top 30%, Middle 50 % and Bottom 20 %, as shown in below table A-

Table A     
HQValuePCPM %Performer
 (Top 30 %)
Avg
(Middle 50 %)
Non Performer
(Bottom 20 %)
Total3,95,375100.00%   
HQ170,25517.77%17.77%--
HQ239,4679.98%9.98%--
HQ342,88310.85%-10.85%-
HQ433,9758.59%-8.59%-
HQ540,23010.18%-10.18%-
HQ634,7198.78%-8.78%-
HQ730,2107.64%-7.64%-
HQ827,4126.93%---
HQ925,1646.36%--6.36%
HQ1013,5793.43%--3.43%
HQ1117,8084.50%--4.50%
HQ1211,4232.89%--2.89%
HQ135,3801.36%--1.36%
HQ141,6400.41%--0.41%
HQ151,2300.31%--0.31%

 

But whenever i select one HQ . suppose, if here i select HQ1 then the output is like below

Table B     
HQValuePCPM %PerformerAvgNon Performer
Total70255100%  100%
HQ170,255100.00%--100%

It should be in Performer only but due to the contribution it moved to Non Performer. How to fix it, even after selection it have to be in Performer only and contribution 17.77 %

expression i have used like below 

Performer=

if( (rangesum(above(
Num(
Sum(Aggr(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
/
Sum(total AGGR(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
,'0.00%')
,0,RowNo()))
)
<=.30,

(
Num(
Sum(Aggr(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
/
Sum(total AGGR(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
,'0.00%')
) )

--------------------------------------------------------------------------

Average=

if(
((
rangesum(above(
Num(
Sum(Aggr(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
/
Sum(total AGGR(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
,'0.00%')
,0,RowNo()))
)

>=.30 and

(
rangesum(above(
Num(
Sum(Aggr(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
/
Sum(total AGGR(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
,'0.00%')
,0,RowNo()))
)<=0.80)
,
(
Num(
Sum(Aggr(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
/
Sum(total AGGR(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
,'0.00%')
)
)

-------------------------------------------------------

Non Performer-

if(
(
rangesum(above(
Num(
Sum(Aggr(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
/
Sum(total AGGR(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
,'0.00%')
,0,RowNo()))
)
>=0.81,
(
Num(
Sum(Aggr(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
/
Sum(total AGGR(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
,'0.00%')
)
)

 

 

 

Thanks in Advance

2 Replies
sasikanth
Master
Master

HI, 

Try below one

Performer=

if( (rangesum(above(
Num(
Sum(Aggr(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
/
Sum({1} AGGR(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
,'0.00%')
,0,RowNo()))
)
<=.30,

(
Num(
Sum(Aggr(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
/
Sum({1}  AGGR(
(($(vAch_MQY_PCPM)
/ Count(distinct {<[Division Name]={"$(vDivisionSelection)"}, I_Date={">=$(vCurrentYearStart)<=$(vCurrentDate)"}, CalendarYear=,T_Month, Period_INL=>} [MR Name]) )
/ $(vPCPM_Month))
,HQ))
,'0.00%')
) )

ABP2021
Contributor II
Contributor II
Author

Hi Sasikanth , not working..