Link to home
Start Free TrialLog in
Avatar of pdvsa
pdvsaFlag for United States of America

asked on

Sum help

Experts,

I have a calculated field in the control source of a report:
USD Equivalent: IIf([tblCurrencyExchange].[CurrencyID]=1,"",Format(([tblFXRates]![Amount]*[tblCurrencyExchange]![ExchangeRate]),"Currency"))


I need to sum this USD Equivalent but for each [projects].[ID]
I have an idea how to do it but something is not correct.  
I can not sum it on the report face (doesnt allow since it is calculated)...need to sum in the query design window.

thank you...let me know if you need additional info.
ASKER CERTIFIED SOLUTION
Avatar of Eric Sherman
Eric Sherman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try grouping your report by projects.ID.  Place a textbox in the group header or footer section, and set it's control source to:

 = Format( SUM( ABS([tblCurrencyExchange].[CurrencyID]=1) * [tblFXRates]![Amount]*[tblCurrencyExchange]![ExchangeRate]), "Currency")

Open in new window

Or possibly this, and do the formatting through the textbox properties instead of in the expression:

 = SUM( ABS([tblCurrencyExchange].[CurrencyID]=1) * [tblFXRates]![Amount]*[tblCurrencyExchange]![ExchangeRate])

Open in new window

Avatar of pdvsa

ASKER

thanks.  It works.
Glad to help and thanks for the points.

ET