Page 1 of 1
IF I AM NOT attrs
Posted: Fri Sep 12, 2014 9:22 am
by Mithun.Mistry1103
Hello
I am again on a 3 way road
I am writing a rule that says ' If i am not matching the string(in this attrs) in DM1 dimension , make me elements in (DIM1, DIM2, DIM3, DIM4) ALL Grey? How would I solve that? Its a simple question but the methods I have tried just dont work yet they work for other cubes for some reason!
Thank you
Re: IF I AM NOT attrs
Posted: Fri Sep 12, 2014 11:19 am
by Wim Gielis
Is your string attribute an alias?
Did you check the values in the cube }ElementAttributes_DIM1 ?
Re: IF I AM NOT attrs
Posted: Mon Sep 15, 2014 8:48 am
by mithun.mistry11
Hello Wim, its not an alias, it is text and I have looked in the elementattribute and it is correct in that cube...
Re: IF I AM NOT attrs
Posted: Mon Sep 15, 2014 10:59 am
by Wim Gielis
Then, as clearly requested in the guidelines for posting here, provide the rule(s) that you have.
Be as clear as possible. Provide additional explanations and screenshots as to the cubes/dimensions/elements/attributes and so on.
Re: IF I AM NOT attrs
Posted: Mon Sep 15, 2014 11:01 am
by Michel Zijlema
Mithun.Mistry1103 wrote:Hello
I am again on a 3 way road
I am writing a rule that says ' If i am not matching the string(in this attrs) in DM1 dimension , make me elements in (DIM1, DIM2, DIM3, DIM4) ALL Grey? How would I solve that? Its a simple question but the methods I have tried just dont work yet they work for other cubes for some reason!
Thank you
It won't be easy to answer your question without any further information. Could you elaborate on the methods you've tried?
Michel
(edit: posted before I saw Wim's comment)
Re: IF I AM NOT attrs
Posted: Thu Sep 25, 2014 1:40 pm
by mithun.mistry11
Hello
After reading some of the feedbacks, I came up with an idea to show what I am trying to do. Obviously, because of confidentality, I have designed something on football.
The image below will show that I have players and I have monthly ratings on how those players did those months.
Now because
'sept' has matched
this month: September, they will be white cells so I can rate these players again, but as you can see, the other months are grey cells.
That is what I want to achieve... Now if
this month: was an attribute, how would I do this using that attribute.
Originally I was trying to do if I am not this month: then grey me out.
Does this make more sense now?

Re: IF I AM NOT attrs
Posted: Fri Sep 26, 2014 1:46 pm
by Neil Watson
Hi,
there are a number of ways to approach this, but first we need to identify exactly what you mean by Grey it out.
I'm going suggest that you want to allow input when the Month = This Month and not when it isn't.
Possible 1
Create another cube which will hold the Ratings data and is fully open to input.
In your cube below, have a rule similar to
['Rating'] = N:
if (!Month @= attrs('Month', !Month, 'This Month'),
stet,
DB('Ratings Source', !Month, !Year, 'Rating')
);
Possible 2
Create a new element in the Measures dimension one called "Input" and the other called "Reporting",
"Input"
"Reporting"
['Reporting'] = N:
if (!Month @= attrs('Month', !Month, 'This Month'),
stet,
['Input']
);
Possible 3
You create security rules on the cube and a rule similar to,
[] = S:
if (DB('}ElementSecurity_Month, !Month, !Groups) @= attrs('Month', 'This Month'),
'WRITE',
'READ'
);
In hindsight, I would go for the easiest most simple which is option 2 and stay away from the security rules until you are far more comfortable.
The syntax may not be exact but it's the principal you're looking for I hope
Good luck
Neil
Re: IF I AM NOT attrs
Posted: Fri Sep 26, 2014 3:01 pm
by tomok
Neil Watson wrote:Possible 1
Create another cube which will hold the Ratings data and is fully open to input.
In your cube below, have a rule similar to
['Rating'] = N:
if (!Month @= attrs('Month', !Month, 'This Month'),
stet,
DB('Ratings Source', !Month, !Year, 'Rating')
);
Possible 2
Create a new element in the Measures dimension one called "Input" and the other called "Reporting",
"Input"
"Reporting"
['Reporting'] = N:
if (!Month @= attrs('Month', !Month, 'This Month'),
stet,
['Input']
);
Possible 3
You create security rules on the cube and a rule similar to,
[] = S:
if (DB('}ElementSecurity_Month, !Month, !Groups) @= attrs('Month', 'This Month'),
'WRITE',
'READ'
);
While Options 1 and 2 will work, they are less then optimal because it will be impossible to have a cube view that looks like what the OP has shown. You would have to do it in a web sheet. Option 3 is the best way to go and it's really quite simple.