Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to show a line graph of sales for the year. The 'Sales' field shows actual sales and 'Forecast' shows forecasted sales. I want to show actual sales up to the week before the current week and forecasted sales from the current week until the year end. The forecast is easy as when this reloads it only ever starts from the current week, however actual sales (Sales) has data for a few weeks into the future as there may have been orders placed for delivery. Can someone help me with the set analysis for this, or would an 'IF' statement be better?
Thanks
Hi,
Please post an example of data.
It might be best with an IF-statement, but it's easier to see if you post a simple example.
Regards
Axel
Hi,
You can use the following:
= sum({<Date = {'>=$(=YearStart(today()))<=$(=weekstart(today()))'} >} Sales)
Dear Adrian,
Please post sample application for better understanding
Regards
Kiran Rode
+91 8976977897
First Create the Week Field which will give you the week Number from the yearstart.
then you can write the expression like this:
sum( {<Week = {"$(=Max(WEEK) - 1)"} >} Sales)
hope this will help.
-Nilesh
I agree that an if statement is the way to go: something like:
if(DATE< weekstart(today()),sum(Sales), sum(Forecast))
Like is mentioned previously, a sample qvw would let us help you further.
Hope this helps!
See if the attached helpes
Add 'Background color' and 'Line Style' in 'Sales' Expression.
if(WeekNum < week(today()), rgb(141, 170, 203), rgb(252,115,98))
if(WeekNum < week(today()), '<S1>', '<S2>')