Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Matching forecast with sales

I need some help with figuring out how to display a forecast with older sales. I have future forecasts that I want to display next to sales from the previous year. I have some small files attached. If anyone could help with this, I would appreciate it

WeekProductForecast
201431A150,000
201430B300,000

WeekProductSales
201331A142,200
201330B535,000
201231A112,200
201230B300,000

I want it to display like this:

WeekProductForecastSales in 2013Sales in 2012
201431A150,000142,200112,200
201430B300,000535,000300,000
13 Replies
MarcoWedel

Hi,

for those sales dates that match the forecast weeks, the solution delivers this result:

QlikCommunity_Thread_129627_Pic5.JPG.jpg

As your sample data doesn't contain values for all products in all weeks and all years, there are blank fields in the pivot table though.

hope this helps

regards

Marco

Not applicable
Author

I'm having an "allocated memory exceeded" error....

I'm also looking at the expressions and I only see one for amount. How did you do the expressions forecast 2014, sales 2013, etc?

MarcoWedel

Hi,

there is only one expression "amount".

The period columns are a dimension dragged to the top like this:

QlikCommunity_Thread_129627_Pic6.JPG.jpg

and defined as:

=Dual(Type&' '&Year,Year)

I did not exactly understand your requirement about which dates and weeks are to be compared and thus expected to be in one row.

Can you clarify with further examples?

thanks

regards

Marco

Not applicable
Author

Marco,

I've attached a new excel file that includes both forecasts and sales data in the tabs. It's smaller so it's easier to understand when looking at it. The sample layout is what I would like to see in QV. The chart below is a good example of what I want to see but instead of WeekNum, I want to see the Monday date (example: 08/04/2014)  and the forecast and the sales from previous years.

QlikCommunity_Thread_129627_Pic5.JPG.jpg

I think we need to convert the sales history field "Week" from Monday date (08/05/2013) in the excel file to the week number which would be week 32 (201332).... so we ignore the 2013 so that we can do a side by side comparison of future forecast vs sales from previous years...

Please let me know if you need any other clarifications. Thank you so much for your help