Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to get a set analysis on Prior Year, Current Month Sales;
My set analysis I'm trying is
Sum({$<Year={$(=Max(Year)-1)}>{$<Month={$(=Max(Month))}>}[sales])
The expression above comes up with nothing. What am I missing?
and Prior Year - relative week (example: 8/27/12 current year week; 8/26/11 - prior year week)
sum({$<Year={"<=$(=Max(Year)-1)"},Week={$(=Max(WeekBeginDate))}=>}[sales])
This also comes up with nothing.
Any help is appreciated. Thanks in advance.
If you e.g. select on Date field, you need to clear that field in your set expression to get around incompatible selections (also, if you can select on other fields, consider clearing them when they get in conflict with selections you do in your set modifier):
Sum({$<Year={$(=Max(Year)-1)}>{$<Month={$(=Max(Month))}, Date= >}[sales])
I haven't understood your second expression - how is Week and WeekBeginDate defined.
It's usually easier in these cases to only operate on Date fields (e.g. using an advanced search expression), clearing all other calendar fields in your set expression.
Hope this helps,
Stefan
Set analysis starts and ends with {}. dollar sign is declared once.
Sum({$<Year={$(=Max(Year)-1)}>{$<Month={$(=Max(Month))}>}[sales])
So, the above set analysis expression would be:
Sum({$<Year = {$(=Max(Year)-1)}>,<Month={$(=Max(Month))}>}[sales])