Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sebastian_fager
Contributor III
Contributor III

Combine Variable with condition

Hi,

Want to see the rolling 52 weeks for sales on category X.

Have the following variable and analysis. But how do i combine them?

Set analysis:

Sum({<Category = {'X'}>} Sales)

Script:

LET vR52 = '{<Year=,YearMonth=, Quarter=, Month=, Week=, Date =, DateNum = {">=$'&'(vSelectedDate364)<=$'&'(vSelectedDate)"}>}';

Variables:

vSelectedDate364:

=num($(vSelectedDate)-363)

vSelectedDate:

=Max(DateNum)

The variables and set analysis works, but can't figure out how to combine them..

Have tried:

Sum({<Category = {'X'},$(vR52)>} Sales)

10 Replies
sebastian_fager
Contributor III
Contributor III
Author

Hi, this works great! Many thanks for all the responses!