We help IT Professionals succeed at work.

How do I create a formula column that will subtract two generated colums, from column grouping?

rhservan
rhservan asked
on
259 Views
Last Modified: 2014-12-23
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!!
Comment
Watch Question

Phillip BurtonDirector, Practice Manager and Computing Consultant
Awarded 2014
Top Expert 2014

Commented:
Not enough information, for example,what is your data source and data set?

Author

Commented:
Hope this helps!
Variance.rtf
Phillip BurtonDirector, Practice Manager and Computing Consultant
Awarded 2014
Top Expert 2014

Commented:
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?

Author

Commented:
Yes, Actual and budget is in a Category dimension which compares Actual dollars spent to Budget Dollars spent based on the money measure signeddata.
Phillip BurtonDirector, Practice Manager and Computing Consultant
Awarded 2014
Top Expert 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I crated a column inside the group and placed  formula in there.  When I ran the report it eroded with a scope problem.
Phillip BurtonDirector, Practice Manager and Computing Consultant
Awarded 2014
Top Expert 2014

Commented:
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",SIGNEDDATA,0)

Author

Commented:
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_BUDGET.Value="Budget",Fields!SIGNEDDATA.Value,0))-
sum(IIf(Fields!ACTUAL_BUDGET.Value="Actual",Fields!SIGNEDDATA.Value,0))

GIVES ME THIS:
Result.rtf
Director, Practice Manager and Computing Consultant
Awarded 2014
Top Expert 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.