I have a Document fact table which stores details regarding documents.
Each document can have many revisions and this is represented by revid.

I have a dimension for the customer->site->editor hierarchy. Also have a dimension for date.

I need to display the number of documents in the database for each customer->site->editor hierarchy

But I have to consider only those documents which has the maximum revid while getting the count.

I am not sure how to go about thi susing MDX. Please help me out.