I'm pretty new to MDX, but am stuck supporting a new tool and have a question about a request that recently came my way. We have a cube of prescription data, where prescribers are assigned to different territories. My client wanted a function to calculate the number of prescribers assigned to a territory, so I produced this:
COUNT(
FILTER([M_Prescriber].[Prescriber].[Prescriber].Members*[Measures].[M-TRx],
[M_Market_Product].[Product].[All]
)
)
Which gives a count of prescribers who have written a prescription in the time period. The problem the client has is that this function produces a different result in each month because, naturally, some prescribers don't write prescriptions every month. Is there a way to return the number of prescribers assigned to a territory without taking into account whether they have any prescription data in a particular month. Or could I calculate this value in the latest time period and use that value in every time period?
Let me know if I can provide more details.