

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculation for the next day opening stock
Dear all,
I am stuck in finding the next day opening stock. Can any one help me to do the following calculation working.
their are three table or file which I have loaded in the QV
Calculation should
Opening stock + Production - Sales = Closing Stock
Closing Stock will be the opening stock for the next day. same formula for the next day this will go on day wise month or year.
Day end Closing Stock will be next Day opening Stock
Month end Closing Stock will be next month 1st day Opening Stock
Year end Closing Stock Will be next year 1st month 1st day Opening Stock
Result should look like this
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Replace this:
If (OpeningQTY = '', null(), OpeningQTY) | as OpeningQTY, |
With:
If (OpeningQTY = '' or OpeningQTY = 0, null(), OpeningQTY) | as OpeningQTY, |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
see attached file for frontend solution
hope this helps


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you want to do it in script...


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Federico,
It looks fine but the issue is that I am having a multiple line of production with the combination of plant product packing and date. when i want the only opening stock value.
I am getting some issues while running the original file.
error is not peeking the closing stock to opening stock


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear frank,
your concept is ok but i want to add new column insisted of using above function.
it not add the opening stock after month gets over.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can group by fields you want before peeking values.
If you have a set of data to play with it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
are you using a mastercalendar or how do you want to add the new date lines?
If im using my above mentioned example and add new month datefield in excel then
the pivottable behaviour is correct in my opinion!


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying from group by function but the error is not peeking the next day opening stock value is coming null


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear frank,
I don't want to added any data in the opening stock excel file.
It could be auto update in temp file when ever the production and sales data is updated.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you say use group by pfa how i have used it

- « Previous Replies
-
- 1
- 2
- Next Replies »