I'm fairly new to SSAS so I'm hoping someone can help me with this problem. I have a median calculation that works good as long as the amount of data being returned isn't too large. For example, if I query just the median calculated measure and slice it by location it's fast (there's only 4 locations). However, if I filter by specific date and then slice by CSN (patient account) it will take very long time. My cube is related to health care data. The median calculation is the median patient arrival to patient placed in room event. The fact table has about 160k rows and looks like this:
csn | arrivaldate | arr_to_tx_area
csn = patient account (1 account per visit)
arrivaldate = patient arrival to facility
arr_to_tx_area = minutes it took for patient to go from arrival to a room
I've created a calculated member using the Encounter dimension. The encounter dimension is hierarchical. It has a csn with a foreign key to mrn (medical record number). The calculation looks like this:
Median([EncounterDim].[CSN].CurrentMember.Children, [Measures].[Arr To Tx Area] )
If I try to slice using CSN from the encounter dimension I don't get any data returned so I created another dimension called VisitDim that just has CSN in it with no hierarchical data. If I filter by a specific date and then slice by CSN it will finish but it takes 5 to 10 minutes (returns around 150 CSN's). If I try using a larger date range it will take a really long time and sometimes it will eventually throw an error.
The goal of this calculation is to create a report in powerpivot where the user can slice by date and facility but also can drill down into the detail of whatever is being filtered. The detail being the CSN and patient related data.
Thanks for any help that can be provided!