Alex,
You can use the formula as below.
=EPMDimensionOverride("000","PRODUCT","CALC=N;FAMILY=A4")
where:
000 is the report ID
PRODUCT is the dimension in rows.
FAMILY is the name of family property
A4 is the excel cell where you have Family dimension page axis selection. You can change this as per your report.
Regards
Nikhil