|
发表于 2014-5-11 05:20:39
|
显示全部楼层
appleglaze28 wrote:How do I create a view to limited to specific elements only? I'm creating this as part of a TI that loads that data 3 times a day daily....I need to zero out the certain elements in certain dimensions specifically date, year and measures for that date so I can refresh the data as scheduled. I have other dates for historical purporses so I don't want to miss out on that and so far I ended up creating a view that zero out all my previous data.
Code: ViewCreate('PRODUCTION_capacity','Current');
ViewTitleDimensionSet('PRODUCTION_capacity','Current','base_month_dates');
ViewTitleDimensionSet('PRODUCTION_capacity','Current','measures_machines_capacity');
ViewTitleDimensionSet('PRODUCTION_capacity','Current','base_years');
ViewTitleElementSet('PRODUCTION_capacity','Current','base_month_dates',DIMIX('base_month_dates',vDate));
ViewTitleElementSet('PRODUCTION_capacity','Current','base_years',DIMIX('base_years',vYear));
ViewTitleElementSet('PRODUCTION_capacity','Current','measures_machines_capacity',DIMIX('measures_machines_capacity','WIP DH Lots'));
ViewZeroOut('PRODUCTION_capacity','Current');
ViewDestroy('PRODUCTION_capacity','Current');
I should probably reiterate what Lotsa said the last time he replied to you, but what the hey, I'm in need of diversion for a moment...
ViewTitleElementSet is not something that should be used with data movement views. There are no titles, rows and columns in data movement views, those relate to how a human arranges a view for the purposes of slicing and dicing. For data movements, you should look at views as flat files.
To create a view to zero out a range of data you use:
- SubsetCreate to create a subset for any dimensions where you want to limit the elements being zeroed.
- SubsetElementInsert to add those elements to the subset;
- ViewCreate to create the view;
- ViewSubsetAssign to attach the subsets created earlier to the view. All other dimensions will use "All" elements;
- ViewExtractSkipZeroesSet and ViewExtractSkipCalcsSet to skip over zeroes and consolidations.
- ViewZeroOut to zero out the data;
- ViewDestroy to destroy the view after you're finished with it;
- SubsetDestroy to destroy the subsets. |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|