Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two if statements as shown below. The first works out the revenue target value for the current month to date if the day is not the first of the month and the seconds works out the values for the previous month (the dimension is customer. My problem is that I don't know how to put this in one statement as it errors. Maybe I'm not doing the best way and help would be greatly appreciated
=if (day(today())>1,
sum({$<MonthID = {$(=Max(MonthID))},
Quarter = ,
[LinkId] = {"TMP"},
Month ={$(=month(today()))},
Year ={$(=year(today()))}
>} [Revenue Target Value]))
---------------
=if (day(today())=1,
sum({$<MonthID = {$(=Max(MonthID))},
Quarter = ,
[LinkId] = {"TMP"},
Month ={$(=month(Addmonths(Today(), -1)))},
Year ={$(=year(today()))}
>} [Revenue Target Value])
Right, so this isn't working? (Removed the parenthesis after the end of first Sum function)
=If(Day(Today()) > 1,
Sum({$<MonthID = {$(=Max(MonthID))}, Quarter = , [LinkId] = {"TMP"}, Month ={$(=month(today()))}, Year ={$(=year(today()))}>} [Revenue Target Value]),
Sum({$<MonthID = {$(=Max(MonthID))}, Quarter = , [LinkId] = {"TMP"}, Month ={$(=month(Addmonths(Today(), -1)))}, Year ={$(=year(today()))}>} [Revenue Target Value]))
May be like this:
=If(Day(Today()) > 1,
Sum({$<MonthID = {$(=Max(MonthID))}, Quarter = , [LinkId] = {"TMP"}, Month ={$(=month(today()))}, Year ={$(=year(today()))}>} [Revenue Target Value])),
Sum({$<MonthID = {$(=Max(MonthID))}, Quarter = , [LinkId] = {"TMP"}, Month ={$(=month(Addmonths(Today(), -1)))}, Year ={$(=year(today()))}>} [Revenue Target Value]))
Wow, how quick did you reply!!!
You put an extra bracket on the end. I took that off and got garbage after expression:"'," error
after the first if statement none of the restricted are highlighted in the second expression
Any idea
Right, so this isn't working? (Removed the parenthesis after the end of first Sum function)
=If(Day(Today()) > 1,
Sum({$<MonthID = {$(=Max(MonthID))}, Quarter = , [LinkId] = {"TMP"}, Month ={$(=month(today()))}, Year ={$(=year(today()))}>} [Revenue Target Value]),
Sum({$<MonthID = {$(=Max(MonthID))}, Quarter = , [LinkId] = {"TMP"}, Month ={$(=month(Addmonths(Today(), -1)))}, Year ={$(=year(today()))}>} [Revenue Target Value]))
perfect thanks so much. You're a diamond., are you on linkedin?
I sure am
what's your last name
Its Talwar