IF dosnt work with NUMBR
Posted: Mon Jan 16, 2017 10:36 am
Hello.
I'm creating a cube with a cell that returns "1" when the first character of the cost center equals 4 and returns "0" when it is other than 4. And I'm having problems, though it's a simple rule. The "IF" Always returns "0", even when the value is true (4).
I am making a rule using two elements:
The "first number" element returns the first character of the cost center:
['First number'] = NUMBR (SUBST (! ALL.D.CENTRO_CUSTO_UNIDADE, 1,1));
The second element brings "1" to 4 and "0" if it is not:
['Value'] = IF ('first number' = '4', 1, 0);
Anyone can help me to understand what is worng?
Thanks.
Manoel.
I'm creating a cube with a cell that returns "1" when the first character of the cost center equals 4 and returns "0" when it is other than 4. And I'm having problems, though it's a simple rule. The "IF" Always returns "0", even when the value is true (4).
I am making a rule using two elements:
The "first number" element returns the first character of the cost center:
['First number'] = NUMBR (SUBST (! ALL.D.CENTRO_CUSTO_UNIDADE, 1,1));
The second element brings "1" to 4 and "0" if it is not:
['Value'] = IF ('first number' = '4', 1, 0);
Anyone can help me to understand what is worng?
Thanks.
Manoel.