Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have this problem, I am trying to get the sum from the beggining of time until the date that is select in filters, in order to obtein the inventory stock by date (the range of date selected) I mean:
Fecha Movimiento | // sum({< BODEGA={'Bodega PT local'},[Fecha Movimiento]={'<=$(=max(vFecha))'}, Año=, Mes=, Dia= >} Cantidad1) // /1000 //sum({<[Fecha Movimiento] = {'<=$(=date(vFechaCorte))'}>}Cantidad1) sum({< BODEGA={'Bodega PT local'},[Fecha Movimiento]={'>=28/01/2001 <=22/06/2014'} >} Cantidad1) | MakeDate(Año, Mes, Dia) | =date(36919) |
---|---|---|---|
Total | 470122.63 | 28/01/2001 | |
02/06/2014 | 0.00 | 02/06/2014 | 28/01/2001 |
03/06/2014 | 0.00 | 03/06/2014 | 28/01/2001 |
04/06/2014 | 0.00 | 04/06/2014 | 28/01/2001 |
05/06/2014 | 0.00 | 05/06/2014 | 28/01/2001 |
06/06/2014 | 0.00 | 06/06/2014 | 28/01/2001 |
07/06/2014 | 0.00 | 07/06/2014 | 28/01/2001 |
08/06/2014 | 0.00 | 08/06/2014 | 28/01/2001 |
09/06/2014 | 0.00 | 09/06/2014 | 28/01/2001 |
10/06/2014 | 0.00 | 10/06/2014 | 28/01/2001 |
11/06/2014 | 0.00 | 11/06/2014 | 28/01/2001 |
12/06/2014 | 0.00 | 12/06/2014 | 28/01/2001 |
13/06/2014 | 0.00 | 13/06/2014 | 28/01/2001 |
14/06/2014 | 0.00 | 14/06/2014 | 28/01/2001 |
15/06/2014 | 0.00 | 15/06/2014 | 28/01/2001 |
16/06/2014 | 0.00 | 16/06/2014 | 28/01/2001 |
17/06/2014 | 0.00 | 17/06/2014 | 28/01/2001 |
18/06/2014 | 470122.63 | 18/06/2014 | 28/01/2001 |
19/06/2014 | 0.00 | 19/06/2014 | 28/01/2001 |
20/06/2014 | 0.00 | 20/06/2014 | 28/01/2001 |
21/06/2014 | 0.00 | 21/06/2014 | 28/01/2001 |
22/06/2014 | 0.00 | 22/06/2014 | 28/01/2001 |
as you can the script that I tried is there, I want it sum from 0/0/0000 to date, but is only sum from selected dates, which is a mistake.
best Regards
The key is to also ignore your selectable date filters. I typically create a lowest-level date field (i.e. Date or %DATE_KEY) that is not displayed to users for selection. Then use this field to control your set analysis. Might look something like this:
Variable Definitions
vLatestDate
=max(Date)
vDateIgnore
Month,Year,Day,Date
Expression
sum({<$(vDateIgnore),%DATE_KEY={"<=$(vLatestDate)"}>} Sales)
Regards,
Vlad