Page 1 of 1

get the value date of the weekend and the last week of the m

Posted: Sat Sep 21, 2013 3:00 pm
by ChauBSD
Hi everyone

I have cube , i using cognos insight connect tm1. I want to take the weekend, the last week of the month. How do ??? Get the value as shown in image
Value.jpg
Value.jpg (90.43 KiB) Viewed 4216 times
thansk all

Re: get the value date of the weekend and the last week of t

Posted: Sat Sep 21, 2013 3:28 pm
by declanr
ChauBSD wrote: I have cube , i using cognos insight connect tm1. I want to take the weekend, the last week of the month. How do ??? Get the value as shown in image
Are you purely using insight or do you have access to the rules editor? (be it through perspectives or performance modeler)

If you can change rules and dimensions etc you just need to add a C-level rule and decide how you will specify which day is looked at for a given week.

Assuming it has just built 1 time dimension for you in the exact format below you may want to add in a string attribute to the dimension called "week_last_date" (name purely for example, call it whatever you want.)

Code: Select all

['Value']=C:
        If ( Attrs ( 'Time', !Time, 'week_last_date' ) @<> '',
                DB ( 'Cube', !Dim1, Attrs ( 'Time', !Time, 'week_last_date' ), 'Value' ), CONTINUE );
Another option would be to create an extra dimension that only consisted of the "Week" elements from your time dimension and then having the attribute in there.

Code: Select all

['Value']=C:
        If ( Dimix ( 'Week', !Time ) <> 0,
                DB ( 'Cube', !Dim1, Attrs ( 'Week', !Time, 'week_last_date' ), 'Value' ), CONTINUE );
Both are using the same concept.
You could also use the Elcomp/Elcompn functions to find the last element in the consolidation but be very wary about this as elements could move etc.

Performance Modeler does have some built in calculations you can apply to time dimensions, not sure if there is one to do exactly this but it could be worth having a look.


Edit - I didn't specifically mention the "Month" part of the rule but you can extrapolate the above to cover that.

Re: get the value date of the weekend and the last week of t

Posted: Sat Sep 21, 2013 4:27 pm
by Duncan P
This looks like a standard closing balance roll-up. If (and this is a big if) all the measures in all the cubes that use this time dimension need to roll up the same way then you can set the hierarchy weights on that dimension such that for each parent the last child period has a weight of 1 and all the others have a weight of 0.

Re: get the value date of the weekend and the last week of t

Posted: Mon Sep 23, 2013 3:01 am
by ChauBSD
Hi all,

I have 2 dimension

+ Dimension time : Consolidate year, Consolidate month, element date

+ Dimension Value: element value

I want get date last of month. How do. Can yous say again. I can't update weigth property element.


Thanks all

Re: get the value date of the weekend and the last week of t

Posted: Mon Sep 23, 2013 9:31 pm
by lotsaram
Assuming that all time dimension rollups are laid out and indexed in chronological order. (It is a big if but not half so big an if that users only want to ever see weekend data roll up)
Then you can just use: ElComp( 'Time', !Time, ElCompN( 'Time', !Time ) )
but having an "ending date" attribute is generally by far the safer and more recommended approach: AttrS( 'Time', !Time, 'End Date' )

Re: get the value date of the weekend and the last week of t

Posted: Tue Sep 24, 2013 1:49 am
by ChauBSD
Hi all,
I created cube, data import from Excel to cognos insight.
+Cube: FILEImport
+Dimesion: Month (consolidate Year, Consolidate Quater, Consolidate Month, element date)
I inserted attribute LastDate in dimension Month.
Excel.jpg
Excel.jpg (23.98 KiB) Viewed 4065 times
I write rules

['VND'] = C: IF(ATTRS ('Month', !Month, 'LastDate')@='Max', DB('FILEImport', ATTRS ('Month', !Month, 'LastDate'), 'VND'), CONTINUE);

But it not excute.....