rhservan
asked on
How do I create a formula column that will subtract two generated colums, from column grouping?
I have a Matrix with a column grouping.
when running the report it creates two columns.
Column A Column B
I need:
Column A Column B =Column A - Column B
I need to subtract Column B from Column A somehow by referencing
I am having a problem with the formula where it only shows column A in the formula colum.
Please advise!!
when running the report it creates two columns.
Column A Column B
I need:
Column A Column B =Column A - Column B
I need to subtract Column B from Column A somehow by referencing
I am having a problem with the formula where it only shows column A in the formula colum.
Please advise!!
Not enough information, for example,what is your data source and data set?
ASKER
Hope this helps!
Variance.rtf
Variance.rtf
Are you saying that there is a varchar field called ACTUAL_BUDGET, which says "Actual" or "Budget", and there is a money field called SIGNEDDATA?
ASKER
Yes, Actual and budget is in a Category dimension which compares Actual dollars spent to Budget Dollars spent based on the money measure signeddata.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I crated a column inside the group and placed formula in there. When I ran the report it eroded with a scope problem.
Let's start slowly then. Please try the following, and tell me which formulas give an error or an unexpected result.
=sum(SIGNEDDATA)
=sum(IIf([ACTUAL_BUDGET])= "Actual",1 ,0)
=sum(IIf([ACTUAL_BUDGET])= "Actual",S IGNEDDATA, 0)
=sum(SIGNEDDATA)
=sum(IIf([ACTUAL_BUDGET])=
=sum(IIf([ACTUAL_BUDGET])=
ASKER
ASKER
UPDATE - Disregard previous above communication.
I moved the parentheses to the end. Which gave more of a result. However, still not correct. I added the column outside of the group in the design, thinking it would give a single column in the result. But not. See attached file. 2 problems still exist:
1. Need a single column for the result
2. Need the subtraction to work correctly
=sum(IIf(Fields!ACTUAL_BUD GET.Value= "Budget",F ields!SIGN EDDATA.Val ue,0))-
sum(IIf(Fields!ACTUAL_BUDG ET.Value=" Actual",Fi elds!SIGNE DDATA.Valu e,0))
GIVES ME THIS:
Result.rtf
I moved the parentheses to the end. Which gave more of a result. However, still not correct. I added the column outside of the group in the design, thinking it would give a single column in the result. But not. See attached file. 2 problems still exist:
1. Need a single column for the result
2. Need the subtraction to work correctly
=sum(IIf(Fields!ACTUAL_BUD
sum(IIf(Fields!ACTUAL_BUDG
GIVES ME THIS:
Result.rtf
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.