I have a list control which groups on currency. Within the list control I display the detailed rows of all records filtered to those with a value >= £500.
However for each row I need to calculate the percentage of the total of the dataset.
Because I am filtering it I can't use Sum(Fields!Amount.Value) so I am trying this:
=100.00*Fields!Amount.Value/Sum((IIf(Fields!Currency.Value = "£", Fields!Amount.Value, CDec(0))),"DataSet")
So where the hardcoded currency symbol is I need to access the current value of currency for the list control, but because my sum of is scoped at dataset level any field access is dataset level. Ideally I'd like something like the following, otherwise any other ideas on how to solve this problem.
=100.00*Fields!Amount.Value/Sum((IIf(Fields!Currency.Value = myListControl.Value, Fields!Amount.Value, CDec(0))),"DataSet")
In fact, thinking about it, it would work if I could access the row level data at that point, but how to do that when its at dataset scope within the sum statement?
Hope that makes sense, any help appreciated.