2 Replies Latest reply on Aug 9, 2018 7:35 AM by Jim Dehner

# Summary calculation of an Attribute

Hello world.! I have this situation (the database cannot be uploaded as you can understand by the titles) and I want to summarize the closing balance of the day according to the single number you see in the corresponding column. So for account 1041 the closing balance is 45619608 CAF and the 447 in account 10200 is 447.85 euro, but for some reason it summarizes everything.

My current calculation is :

if [Currency]='EUR'

then

{fixed [Acount Title],[Date of  Booking],[Address of owner of the account]: MIN([Closing bal.])}

ELSEIF  [Currency]='CAF'

then

{fixed [Acount Title],[Date of  Booking],[Address of owner of the account]: MIN([Closing bal.])}/{fixed DATETRUNC('day',[Date of  Booking]):AVG([EURO2CAF])}

ELSEIF  [Currency]='USD'

then

{fixed [Acount Title],[Date of  Booking],[Address of owner of the account]: MIN([Closing bal.])}*{fixed DATETRUNC('day',[Date of  Booking]):AVG([F2 (Usd2Euro)])}

end

and it when I have the acount title in the field, but when I want to calculate the total it doesn't (and I really feel I'm stuck.!)

Thank you everyone!

• ###### 1. Re: Summary calculation of an Attribute

hi Andreas

I don't understand what do you mean by it summarizes everything?

what kind of result you want? can you describe more precisely?

YT

• ###### 2. Re: Summary calculation of an Attribute

Good morning

Without having your TWBX toebook with at least some dummy data it is difficult to give you a detailed step-step response -

That said the issue you face is that you first need to determine the last date that each account had a transaction and include that in your conditional statements

account max booking date   {fixed [Account number]: Max([date of booking]}

then in your conditional statement you need to include something like     if [date of booking] = [account max booking date]  AND  (the rest of you conditional statement goes in here)

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.