I broke the problem down into three simple parts: the numerator, the denominator, and the final percentage.
The trick is that you want the calculation to respect all [PRESENT] and non-[PRESENT] members of [Attendance Mark] as well as the [All] member. So, [PRESENT] should be 100%, non-[PRESENT] should be null, and [All] should be the percentage of [PRESENT] out of the total.
with
member [Measures].[x] as
aggregate(
exists(
{[Attendance Mark].[Attendance Mark].&[PRESENT]},
{[Attendance Mark].[Attendance Mark].CurrentMember}
), [Measures].[Attendance Count]
)
member [Measures].[y] as
aggregate(
exists(
{[Attendance Mark].[Attendance Mark].CurrentMember},
{[Attendance Mark].[Attendance Mark].&[PRESENT]}
), [Measures].[Attendance Count]
)
member [Measures].[z] as
[Measures].[x] / [Measures].[y], format_string = 'Percent'
select
{[Measures].[Attendance Count], [Measures].[x], [Measures].[y], [Measures].[z]} on 0,
non empty [Attendance Mark].[Attendance Mark].Members on 1
from
[cube]
where [Measures].[x]
represents the numerator, [Measures].[y]
represents the denominator, and [Measures].[z]
represents the final percentage calculation. You can obviously do this in one single step. I broke it out for clarity.