Answered by:
SSAS 2012 - Filter Entire Cube

Question
-
Hello Experts ,
I have a cube ready , working fine with 10 Fact Tables and few Dimensions with 25 Calculated Measures
My Cube contain 6 years of Data from Year 2010 to 2016.
Source of all the cube fact tables are SQL DB views.My requirement is , I want my cube to give only current Year Data .
Approach I want to avoid
1) I do not want to put condition of Current Year using GETDATE() in all the 10 View because it is like replication same condition in all .
2) I do not want to create a Name Set which give Current year ,and use this name Set ALWAYS While along with Measures while Running MDX select query.
3) I do not want to create Calculated Measure with Current year Condition and make it big and complex , so that Calculated Measure always give current Year Data by default
Because all above approach will need changes at all the Tables or all Calculated Measure .
Please assist , can any thing be done at Cube level , so that One change can give me Current year Data for all Measures , and If some day Client ask me to give Only Previuos Year + Current year Data or only Previous Year data from Cube , Making chanage at SINGLE place with do all ?
Please assist ?
- Edited by Rihan8585 Friday, July 29, 2016 6:14 AM edit
Friday, July 29, 2016 6:10 AM
Answers
-
Basically it means that u are loading 6 years of data to the cube BUT only 1 year is relevant? Then ist more or less like this one: As developer asking Business "What do u want to have in the cube?" -Business "Everything, because I dont know what i Need"
If u want to basically filter the cube with a specific date when the users starts browsing the cube, u can use Default MEbers in your Time Dimension.
Or just load the relevant Date members (in your case 2016) in the Time dimension and set Errorconfiguration to "Skip records") While processing u would get a lot of Messages saying that records from 2010 to 2015 would be skipped). Nevertheless u would have lost time for loading this records.
Also one possibility: to build a security which allows only to see 2016 data.
Kr
- Edited by yger Friday, July 29, 2016 8:19 AM
- Proposed as answer by Simon_HouMicrosoft contingent staff Saturday, July 30, 2016 6:15 AM
- Marked as answer by Simon_HouMicrosoft contingent staff Monday, August 8, 2016 4:14 AM
Friday, July 29, 2016 8:07 AM
All replies
-
It should be doable with scoped assignments at the end of your calculations, assigning NULL to anything not in your target time frame.
The things influencing the specific code are the structure of your date dimension(s), the way your existing measures are defined, possible queries to the cube, and finally the ways the client might wish to limit the time frame.
Friday, July 29, 2016 7:56 AM -
Basically it means that u are loading 6 years of data to the cube BUT only 1 year is relevant? Then ist more or less like this one: As developer asking Business "What do u want to have in the cube?" -Business "Everything, because I dont know what i Need"
If u want to basically filter the cube with a specific date when the users starts browsing the cube, u can use Default MEbers in your Time Dimension.
Or just load the relevant Date members (in your case 2016) in the Time dimension and set Errorconfiguration to "Skip records") While processing u would get a lot of Messages saying that records from 2010 to 2015 would be skipped). Nevertheless u would have lost time for loading this records.
Also one possibility: to build a security which allows only to see 2016 data.
Kr
- Edited by yger Friday, July 29, 2016 8:19 AM
- Proposed as answer by Simon_HouMicrosoft contingent staff Saturday, July 30, 2016 6:15 AM
- Marked as answer by Simon_HouMicrosoft contingent staff Monday, August 8, 2016 4:14 AM
Friday, July 29, 2016 8:07 AM