- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis
Good afternoon,
I would like to show the balance of the last period selected in my document. I will try to give an example to explain.
Balances:
date | balance |
01/01/2012 | 1.000,00 |
02/01/2012 | 2.000,00 |
03/01/2012 | 3.000,00 |
With this data, I would create a text object containing the balance of the last date selected.
If no selections should show 3000.
If you select the dates 01/01/2012 and 02/01/2012 should show 2000.
If you select the dates 01/01/2012 and 03/01/2012 should show 3000.
...
I tried to create a variable that contains the maximum date vMaxDate with definition "= max (date)" and then use an aggregate function follows
Balance = sum ({<date = vMaxFecha> balance}}
How should I do this???
A greeting and thank you very much
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Buenos días,
Me gustaría mostrar el Saldo del último periodo seleccionado en mi documento. Intentaré poner un ejemplo para explicarlo.
Saldos:
fecha | saldo |
01/01/2012 | 1.000,00 |
02/01/2012 | 2.000,00 |
03/01/2012 | 3.000,00 |
Con estos datos de base, me gustaría crear un objeto de Texto que contenga el saldo de la última fecha seleccionada.
- Si no hay selecciones debería mostrar 3.000.
- Si se seleccionan las fechas 01/01/2012 y 02/01/2012 debería mostrar 2.000.
- Si se seleccionan las fechas 01/01/2012 y 03/01/2012 debería mostrar 3.000.
- ...
Lo que se me ocurre es crear una variable que contenga la maxima fecha, vMaxFecha con definición "= max(fecha)" y utilizarla después en una función de agregación del siguiente modo
Saldo = sum({<fecha = vMaxFecha>} saldo}
Cómo debería hacer esto???
Un saludo y muchas gracias
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI
Try like this
=sum({<Date = {'$(=vMaxFecha)'}>}Sales)
Please close the thread by marking correct answer & give likes if you like the post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply, but it doesn't work in my document.
I have attached the document.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try this,
=FirstSortedValue(saldo, -fecha)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It work's perfect. Thaks a lot.