In SQL Server Analysis Services (2008) I have a fact table in our DSV laid out like this:
DOC_NO RECORD_NO REPORT_DATE CREATE_DATE CLEAR_DATE INVOICE_TOTAL
1 2000 1/1/2014 12/1/2013 NULL $1000.00
2 2001 3/1/2014 1/14/2014 3/1/2014 $1001.00
3 2002 6/1/2014 1/31/2014 6/1/2014 $1002.00
4 2003 2/15/2014 2/14/2014 NULL $1003.00
5 2004 7/31/2014 2/28/2014 7/31/2014 $1004.00
(Assume that we have dimensions for [DOC_NO] and [RECORD_NO] separately)
In the cube, we have a [Time] -> [Month] -> [Week] -> [Date] dimension. The selected dimension value filters on the REPORT_DATE value in the fact table. Basically if a REPORT_DATE value exists in a month, we display the row of data.
Scenario: In our reporting solution, When the user picks a month from the time filter the desired outcome is that we filter the fact table data for only rows that meet this criteria:
REPORT_DATE >= CREATE_DATE AND (REPORT_DATE <= CLEAR_DATE OR CLEAR_DATE IS NULL)
This amounts to basically telling if a document is "OPEN" or "CLOSED" during a given month. Normally this kind of thing is something we would do conditionally in a named query in the DSV, but due to the dynamic time filtering, we can't do it ahead of time.
Any ideas on how we can accomplish what we're looking for? Basically creating a calculated measure or MDX statement that acts like a dynamic dimension filter.