My goal is to have a collection that pulls data from a SharePoint list. The goal is to add a column to the collection that calculates a running total. Please see table below:
| Priority | Month | VOLUME | [CALCULATUTED RUNNING TOTAL] |
| 1 | JAN | 100 | 100 |
| 2 | FEB | 200 | 300 |
| 3 | MAR | 300 | 600 |
So here is my code:
ClearCollect(
colRunTot,
AddColumns(
Sort(
'SHAREPOINT LIST',
Priority,
SortOrder.Ascending
),
"Running Total",
Sum(
Filter(
'CMS Process Tracker',
Priority =< ThisRecord.Priority
),
'VOLUME'
)
)
);
So this code fails and generates the following error: "Error when trying to retrieve data from the network: Fetching items failed. Possible invalid string in filter query. clientRequeswtID: XXXX". The part of the code that is failing is the Filter Condition "Priority <= ThisRecord.Priority". This condition is supposed to sum up all of the VOLUME but for those where the priority is less that this record's Priority. But it fails. If I change that condition to "Priority <> 3", then it doesn't throw an error and it collects data. So something about the ThisRecord.Priority is throwing the error. (NOTE: All priority is a unique identifier column. like an index.) Any help would be appreciated.