Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need to calculate the current stock, but always taking into account the origin.
I mean that, when you select a year or a month, the stock calculates it from year 0, and not only from the selected period.
In order to be able to assemble a stock chart, with X axis with the variable date or year, or month, etc ...
LOAD
year(BUDAT_MKPF) as Año,
Month (BUDAT_MKPF) as Mes,
week (BUDAT_MKPF) as Semana,
FROM [lib://Table.Data (gbenito)/MSEG.QVD] (qvd);
And the fied Stock is calculates as a Master Metric: Sum(If([Debe_haber] = 'S', 1, -1) * Cantidad)
I attach a support image. Any advice?
Thank you very much