Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

MDX to Get Customer Status in given date range Expand / Collapse
Author
Message
Posted Monday, September 30, 2013 3:40 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, December 4, 2013 6:02 AM
Points: 9, Visits: 85
I have a fact table that stores customer statuses based on when they last chaged. e.g.
Customer Status DateAttained
Cust 1 Live 20130801
Cust 1 Suspended 20130625
Cust 1 Live 20120901
Cust 1 Activated 20120731

So assuming I queried the end of year 2012, I would get a "Live Status" or if I queried their status as of 26th june 2013, I get "Suspended"

This is straightforward for SQL but no clue how to do it in MDX.

Thanks
Post #1499909
Posted Thursday, October 3, 2013 2:52 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, December 15, 2014 3:09 AM
Points: 1,046, Visits: 1,846

SELECT {<<some measures>>} ON 0,
[Customer Dimension].[Customer Status].[Customer Status] on 1
FROM <<your_cube>>
WHERE (NULL:[Dim Date].[Date].&[26062013])

This code will effectively give you the customer status from Start of Date in the dimension till 26th June 2013


Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #1501061
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse