Mithun.Mistry1103 wrote:Hey declanr
Thats worked for me, thank you....what I changed is shown below:
['PassportID']=S:
Db('Personal', DB ( 'Account', !MWeek, !MNINumber, !MTransact, 'MaccountID'), !Mweek, 'Passport ID');
Because of the dimensional order. It makes sense why we would do it this way that you mentioned as its much easier but what could I have done in terms of the @= or will that just not work for what I am trying to achieve? As i Mentioned, it worked to a certain point then then collapsed.
Apologies if this is getting longwinded but Its just a learning what and why you would do it one way and not the other?
Yes sorry, I had a couple of typos as it was still a bit tricky to follow when presented in that format.
I can't say exactly as I assume the rule you've posted isn't the actual one considering it doesn't use the correct syntax and it refers to "PasswordID" which I think should be "PassportID"?
But:
Code: Select all
['PasswordID'] = s:IF('Personal', !Mweek,!Maccount_ID,'MAID') @= ('Account', !Mweek, !MNINumber, !Mtransact, 'MaccountID'), ('Personal',!Mwek,!Maccount_ID,'Passport ID'), 'N');
If corrected syntactically would never work since you are using "!Maccount_ID" which doesn't exist in the "Account" cube so it won't ever be able to find anything for it (and therefore the rule wouldn't save.)
As such you need to get the !Maccount_ID via a DB into the "Account" cube at which point the logical comparison would
ALWAYS be true and therefore redundant e.g.
Code: Select all
DB('Personal', !Mweek, DB ('Account', !Mweek, !MNINumber, !Mtransact, 'MaccountID'), 'MAID')
would always equal
Code: Select all
DB ('Account', !Mweek, !MNINumber, !Mtransact, 'MaccountID')
I am assuming that the measure "MAID" is just a lookup to the dimension !Maccount_ID from the screenshots and that has resulted in the statements above.
But on that subject I am intrigued as to why you would bring the dimension element name into the cube as a cell value; since you are then going to create many duplicates of data that probably aren't needed - since you can just look at the dimension element.