I am quite new to TM1 and am trying to build a cube that spreads a monthly salary across the month.
Our Pay cycle is the 15th of Mth 1 to 14th of Mth 2
I currently have built a cube that looks like this (just a rough extract):
Date | Cost Centre | Salary $ | Daily Salary | Salary per day | Business Day |
15/01/2015 | Sales | $10,000 | $455 | $455 | 0 |
16/01/2015 | Sales | $- | $- | $455 | 0 |
17/01/2015 | Sales | $- | $- | $455 | 0 |
18/01/2015 | Sales | $- | $- | $455 | 0 |
19/01/2015 | Sales | $- | $- | $455 | 0 |
20/01/2015 | Sales | $- | $- | $455 | 0 |
21/01/2015 | Sales | $- | $- | $455 | 0 |
22/01/2015 | Sales | $- | $- | $455 | 0 |
What I want it to look like is something like below:
Date | Cost Centre | Salary $ | Daily Salary | Salary per day | Business Day |
15/01/2015 | Sales | $10,000 | $455 | $455 | 1 |
16/01/2015 | Sales | $- | $- | $455 | 1 |
17/01/2015 | Sales | $- | $- | $0 | 0 |
18/01/2015 | Sales | $- | $- | $0 | 0 |
19/01/2015 | Sales | $- | $- | $455 | 1 |
20/01/2015 | Sales | $- | $- | $455 | 1 |
21/01/2015 | Sales | $- | $- | $455 | 1 |
22/01/2015 | Sales | $- | $- | $455 | 1 |
Code: Select all
=LASTNZ('Daily Salary')
Code: Select all
=LASTNZ('Daily Salary')* Business Days
And Business days to pick up an Attribute from the Date dimension.
This is where I’m striking problems. I have tried to use an ATTRS function to populate the Business Days element. ( the last 4 columns shown are set up as elements of a calculation dimension)
So far I have tried to use
Code: Select all
=attrs(theDate, !thedate, BusDay)
What I’m looking to do is to set the element in the calculation to pick up the value for each row automatically?
Can anyone please advise how I do this?
Thanks in Advance
Danielle