Forum Discussion
Measure with an if statment??
Good morning all,
I'm bit new to this and I was hoping someone could give me some help with the below issue I have.
I got a simple measure and this works fine but I need to add an IF statement to it, what I need it to do is the following,
IF the answer to the below measure is more then [Prime Shelf] value report 0 and if its less report that value. Could someone please show me how to do this.
- Anonymous7 years ago
Hi Snowy34
Free Prime Shelfs = VAR _ANSWER = [Prime Shelf] - [Used Prime Shelf] RETURN IF(_ANSWER > [Prime Shelf], 0, _ANSWER)
Cheers!
A
4 Replies
- AnonymousNot applicable
Hi Snowy34
Free Prime Shelfs = VAR _ANSWER = [Prime Shelf] - [Used Prime Shelf] RETURN IF(_ANSWER > [Prime Shelf], 0, _ANSWER)
Cheers!
A- Snowy34
Helper III
Hi mate,
Just tried that and it just returned the same number as before. In this case, the return value should have been 0
Still showing as -108
- AnonymousNot applicable
Hi Snowy34
Give more info.
It is hard to determine whats wrong according to pieces of information.
But, according to the screenshot below, 'used prome shelf' is 470?
So the calculation is correct. Myabe I got the '>' sign wrong? try using '<' insteaad.Cheers!
A