Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a straight table which i am forcasting figures for 10 weeks.
I have a seperate calendar for my weekly forcast and i have set up variables for the 10 weeks. i.e.
vWeekSelection = ForecastCal_Week
vWeekSelection+1 = ForecastCal_Week+1
vWeekSelection+2 = ForecastCal_Week+2
etc
the problem i am having is with the expression labels of the chart.
for each label i am using the variable.
so if i select the current week (46), i get the correct week numbers up to 52, but then the next expression lable is showing 53 when i want it to go back to 1
Does anyone know what i can do to correct this please?
try:
vWeekSelection+1 = ceil(mod((ForecastCal_Week+1)*10,521)/10)
or
vWeekSelection+1 = if(mod(ForecastCal_Week+1,52)=0,52,mod(ForecastCal_Week+1,52))
try using the mod function:
vWeekSelection+1 = mod(ForecastCal_Week+1,52)
Hi,
Instead of writing multiple expressions you can do that in single expression, if you have date and week fields in your data model then
=Sum({<DateDimension={'>=$(=WeekStart(Max(DateDimension), -10))<=$(=Max(DateDimension))'}>} Sales)
In the above expression replace DateDimension with you dimension name and Sales with your field.
Hope this helps you.
Regards,
Jagan.
Hi, i have just noticed a problem with your solution..
if i select week 46 for example, i get 47,48,49,50,51,0. it doesnt show me 52
Do you know what the problem could be?
try:
vWeekSelection+1 = ceil(mod((ForecastCal_Week+1)*10,521)/10)
or
vWeekSelection+1 = if(mod(ForecastCal_Week+1,52)=0,52,mod(ForecastCal_Week+1,52))
Hi, great, the 2nd one did the trick
thanks again