Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stock per month

Dear All,

I have been browsing the forum for a while now looking for my answers but I was not able to find the correct answer.

There is a need for a chart per month , last 12 months, with 2 bars. One for the sales that month, one for the stock at end of that month.

I have used a formula for YTD sales and that works fine.

Now the stock:

I have a Begin-value of the stock, dated 01-01-08.

The charts needs to visualize the usage of the parts, combined with the begin-value of that part.

The first month is 12 months ago, and needs to calculate the usage till the end of that month.

Any ideas?

Thanks a lot for you help in advance!

2 Replies
Not applicable
Author

Hi Josh,

here are an example to calculate a three month sum:

Sum ( {< Date={">=$(=addmonths(monthstart(max(Date)),-2)) <=$(=addmonths(monthend(max(Date)),0))"}>} Stock)

If yo select a year, you get the sum of the last quarter of that year.

Do you select a date, 20.04.2009, sum will be calculated from Feb, Mar, April. ....

Hope that helps!

Rainer

johnw
Champion III
Champion III

Something like this, perhaps:

"Beginning Stock" + sum({<Year=,Quarter=,Month=,Week=,Date={"<=$(=date(monthend(max(Date))))"}>} "Added to Stock" - "Subtracted from Stock")