on 04-04-2016 4:54 PM
Hi'
Here's the formula:
If DateDiffInDays({DATE_BT}, CurrentDate()) <= 30 then "0-30" Else
If DateDiffInDays({DATE_BT}, CurrentDate()) > 30 and DateDiffInDays({DATE_BT}, CurrentDate()) <= 90 then "30-90" Else
if DateDiffInDays({DATE_BT}, CurrentDate()) > 90 and DateDiffInDays({DATE_BT}, CurrentDate()) <= 120 then "90-120" Else
if DateDiffInDays({DATE_BT}, CurrentDate()) > 120 then "+120"
It keeps telling me "No viable alternative at "If, try rewriting the formula".
Should I be moving the DateDiffInDays formula to another calculated field and use that filed instead in this calculation?
Thanks
Using Lumira Desktop Enterprise 1.29.3
Hi Pascal,
I got a similar error while using multiple if-then-else statements. A work around for it was,
1) creating a separate dimension for DateDiffInDays({DATE_BT}, CurrentDate()).
2) then in the Prepare room using the Group by Range option to set the first 3 conditions.
3) replacing others with "+120" and the interval values with your labels.
Please let me know if there are any questions or comments.
Thank you,
Varun Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.