Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two tables 'HC' and 'Exit' creating an attrition table .
Apr - (sum(Exit)/avg(HC))*9/1
May- (sum(Exit)/avg(HC))*9/2 and so on...
Have filter called primary reason which contains 'Val' and 'Inval' - in 'Exit' table but not in 'HC'.
fx:=
(RangeSum(Above(Count({<Table_from={'Exit'}>}[Employee ID]),0,RowNo()))
/
RangeAvg(Above(Count({<Table_from={'HC'},[Primary Termination Reason]=>}[Employee ID]),0,RowNo())))
*
(9/RowNo()))
But getting blank value if exit count is Zero. Please help me on fixing the value.
You can use the IF statement to check for zero values and handle them appropriately.
try this:
IF(
RangeSum(Above(Count({<Table_from={'Exit'}>}[Employee ID]), 0, RowNo())) = 0,
0,
(RangeSum(Above(Count({<Table_from={'Exit'}>}[Employee ID]), 0, RowNo())) /
RangeAvg(Above(Count({<Table_from={'HC'}, [Primary Termination Reason]=>}[Employee ID]), 0, RowNo()))) *
(9 / RowNo())
)