IF ATTR([Type]) = 'present' then
AVG([ ... whatever your measure field is ...]) ELSE
SUM([ ... whatever your measure field is ...]) END
You don't make it clear whether you have a single measure broken down by a MONTHS dimension, or if you actually have separate measures called JAN, FEB, MAR. If the latter that's messy and you should break it apart by an actual date dimension. (Otherwise, what do you plan to do when a 4th and a 5th month get added in?)
But If it's the latter, then instead of AVG(...), you will do:
([JAN]+[FEB]+[MAR]) / 3
And instead of SUM( ...) you will do:
Appreciate your quick and correct reply. Its working for me.