# #Mutlivalue error when * by a calculated decimal

I wonder if anyone can help please.

Each unique ID object has a Total Value against it as an object
The Total Value is then split into Banding in a variable i.e. if Total Value is between 0-1000 Then “£0-£1000” Else 1001-5000 Then "£1001-£5000 etc
Each band attracts a Calculated Percentage in another variable i.e. if Banding = “£0-£1000” Then 0.10 Else if Banding = “£1001-£5000” Then 0.20 etc

Then the calculation in a new variable called Projected is SUM(Total Value*Calculated Percentage)

Example below
ID
123

Total Value
£100

Banding
£0-£1000

Calculated Percentage
0.10

Projected
£110.00

If i include the Unique ID in the table i can calculate the total Projected figure for all cases, if i delete it and wish to display the total on its own then i get a #Multivalue error even if i wrap a sum around it. I just can work out where i need to apply the change to get this to work. TIA

I’m assuming that you’ve set Banding up as a detail of ID.

The problem is that if you remove ID you then end up with not knowing which banding to apply to different parts of your total.

The calculation context of ForEach may be useful for what you are trying to achieve because this adds objects to the calculation context when you’ve removed them from the block.

e.g =[Projected] might need to become =[Project] ForEach([Unique ID])

Or you might have to do it a level below (i.e. SUM([Total Value] * [Calculated Percentage] ForEach([Unique ID])

Unfortunately I don’t know your report or data well enough to be more precise but that’s the general scenario where these things happen.