jimicron wrote:I THINK I am on the right path

Not quite there yet... The code is working, but not exactly 100% accurately. What it's doing is putting "Current" in EVERY cell in the "Current Month" column.
Code: Select all
['Current Month'] = S:
IF(DB('Current Month', 'Current' , 'Month') @= DIMNM('Months',DIMIX('Months', DB('Current Month', 'Current' , 'Month'))) ,
'Current' ,
'');
Where, I only want it to say "Current" on the month that is listed in the "Current Month" cube, which is currently "Jun-13"
You haven't included anything that will cause the formula to vary based on what cell intersection within the cube you are looking at (e.g. a ! ref)
What you are saying in your rule is:
Working on the right hand side of the "@="
Code: Select all
DB('Current Month', 'Current' , 'Month')
= 'Jun-13' (it will always be Jun-13 regardless of what position in the cube you are at)
= 6 (probably not actually 6 but that's irrelevant, it will be the dimension position of the element Jun-13)
= 'Jun-13' (this just converts your dimension index back to an element name, so the last 2 steps combined will do nothing other than add some memory overhead)
So with the last 2 steps cancelling each other out, you may as well have just had
Code: Select all
DB('Current Month', 'Current' , 'Month')
= 'Jun-13'
Then you take that result and compare it to the left hand side:
Code: Select all
DB('Current Month', 'Current' , 'Month')
= 'Jun-13' (which is exactly the same as your right hand side)
So your left hand side is the same as the right hand, you may as well be saying IF 1 = 1 DO SOMETHING..... 1 will always equal 1
Perhaps try something along the lines of:
Code: Select all
If ( !Months @= DB('Current Month', 'Current' , 'Month'), 'Current Month', '' );
Think of it in a similar way to when you were first introduced to simultaneous equations in school and you can keep cancelling parts of the equations out until you get down to the core components.