EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB242779: How to delete more than 12 month old data from Intelligent Cubes by using the Incremental Refresh options?


Community Admin

• Strategy


In some business scenarios, users may wish to delete old data from Intelligent Cubes by utilizing the Incremental Refresh option. This KB article provides an overview of how to do so.

Overview

In some business scenarios, users may wish to delete old data from Intelligent Cubes by utilizing the Incremental Refresh option as explained in KB45837. This knowledge base article assumes that the user has a month attribute whose format is YYYYMM as shown below and s/he wants to delete more than 12 months’ worth of old data.

ka04W00000148joQAA_0EM4400000029Ef.jpeg

 
Incremental Refresh Option
Step 1: Create a filter object with the following definition.

ka04W00000148joQAA_0EM4400000029Ej.jpeg

<Whole definition>
Year(AddMonths(CurrentDate(),-12))*100+Month(AddMonths(CurrentDate(),-12))
 
<Breakdown 1: Year(AddMonths(CurrentDate(),-12))*100>
Extract the year part from -12 month date and then multiply it by 100. For example, if today is 5/15/2015, this definition gives you 201400.
 
<Breakdown 2: Month(AddMonths(CurrentDate(),-12))>
Extract the month part from -12 month date. For instance, if today is 5/15/2015, the definition returns the value of 5. Hence, with the value of Breakdown 1, the whole definition will have the value of 201405.
 
 
Step 2: Choose “Delete” from the Incremental Refresh options and use the filter object created in Step 1 to define the definition.

ka04W00000148joQAA_0EM4400000029Eh.jpeg

 

ka04W00000148joQAA_0EM4400000029Eg.jpeg

 
Execution of the Incremental Refresh Report
Executed on 5/15/2015
Before                                                                                   After

ka04W00000148joQAA_0EM4400000029Ei.jpeg

 
Executed SQL
Delete from CUBE IC
where    [YYYYMM]@[Date_ID] < ((Year(AddMonths(CurrentDate(), -12)) * 100) + Month(AddMonths(CurrentDate(), -12)))


Comment

0 comments

Details

Knowledge Article

Published:

April 7, 2017

Last Updated:

April 7, 2017