NumberToString / StringToNumber
Posted: Mon Sep 19, 2011 7:03 am
Hi,
I understand the NumberToString / StringToNumber T.I. functions.
Is there a way to do a NumberToString / StringToNumber function within the cube rules (and not using the T.I.).
The reason for this is because I wish to be able to compare a number that is stored as a string to a number that is stored as a number using a IF TEST.
The following is a basic example.
e.g.
This example results in an error because you cannot compare a string and a number. Is there a way to convert ['String'] to a number (or ['Number'] to a string) before doing the IF TEST. I do not want to run a T.I. process every time a user wants to compare two records.
Regards,
Magnus
I understand the NumberToString / StringToNumber T.I. functions.
Is there a way to do a NumberToString / StringToNumber function within the cube rules (and not using the T.I.).
The reason for this is because I wish to be able to compare a number that is stored as a string to a number that is stored as a number using a IF TEST.
The following is a basic example.
e.g.
Code: Select all
['String'] = S: '123';
['Number'] = N: 123;
['Compare'] = IF(['String'] = ['Number'], 1, 0);
Regards,
Magnus