Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I would like to ask for help regarding the getfieldselections.
I am trying to sum the PR_COUNT of all the years that are currently selected. With single selection, it is working but when I am selecting multiple years, it results to ZERO.
Sum({<PRYear={"$(=getfieldselections( YEAR_1 ))"}>} PR_COUNT)
Since we cannot use any dates in the table to filter because it has different dates that may affect the total count, we have created a reference date. We are using YEAR_1 for the filter.
PR_COUNT = Count(PRAPPROVEDDATE)
Is there a way on getting the Sum of the PR_COUNT whenever I selected multiple years. It will combine all the values of the current selections?
[Date]:
LOAD * Inline
[
DATE_1,YEAR_1
09/01/2016,2016
10/01/2016,2016
11/01/2016,2016
12/01/2016,2016
01/01/2017,2017
02/01/2017,2017
03/01/2017,2017
04/01/2017,2017
05/01/2017,2017
];
PRMonth | PRYear | PODate | POMonth | POYear | PRAPPROVEDDATE |
Mar | 2016 | 5/12/16 | May | 2016 | 3/17/16 |
Mar | 2016 | 5/12/16 | May | 2016 | 3/17/16 |
Mar | 2016 | 4/12/16 | Apr | 2016 | 3/17/16 |
3/11/16 | |||||
Mar | 2016 | 3/14/16 | |||
Mar | 2016 | 3/14/16 | |||
Jun | 2016 | 6/21/16 | |||
Jun | 2016 | 3/15/17 | Mar | 2017 | 6/21/16 |
Jun | 2016 | 6/21/16 | |||
Jun | 2016 | 3/15/17 | Mar | 2017 | 6/21/16 |
Jun | 2016 | 3/15/17 | Mar | 2017 | 6/21/16 |
Jun | 2016 | 3/15/17 | Mar | 2017 | 6/21/16 |
Apr | 2016 | 12/6/16 | Dec | 2016 | 4/18/16 |
Apr | 2016 | 3/9/17 | Mar | 2017 | 4/18/16 |
Apr | 2016 | 4/5/16 | |||
Apr | 2016 | 4/5/16 | |||
4/4/16 | |||||
Jun | 2016 | 6/15/16 | Jun | 2016 | 6/10/16 |
Thanks,
Renz Rocero
Try this: Sum({<PRYear = p(YEAR_1)>} PR_COUNT)
- Marcus