summing decode amount
Now that you helped me solve a total problem in a crosstab report I have run into another problem in the same report.
Given are three of the columns A,B,C in the crosstab report .
A & B are fields from the folders.
C is a calculated field: NVL(DECODE(AccountType,'Income',( DECODE(Cc Concatenated Segments,MAX(Cc Concatenated Segments) OVER(PARTITION BY AccountType ),Surplus Budget,0) ),0),0)
C gives me exactly what I want which is a total in only one of the fields while all the rest are 0. (I think that the reasoning as to why I need that is not relevant here). I do not get a total of Field C (it's always blank) but the user is fine with that.
My problem is that that there needs to be another field D = C - A + B and I do need the grand total of that Field D.
The total is always blank. I have tried using to_number and multiplying the fields by 1.0. I have tried defining a new field that is C * 1.0 in order to make sure that it is a number. The AggregationBehavior is 1 as is the AllowAggregationOverRepeatedValues, but the total will always be blank.
If I remove field C from the calculation then it gives me the sum. In other words Field C is definitely the problem.
Is this total even possible?
Thanks.
Leah