Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010
    Posts
    1

    Unanswered: Problem with SUM and IIF

    Hi,

    I have problem with SUM and IIF.


    =IIf([Title]="Prodajna provizija";[Vrijednost projekta neto]*[Postotak];IIf([Title]="Zadovoljstvo klijenta";([Vrijednost projekta neto]+[Budget])*[Postotak];IIf([Title]="Studija slučaja" And ([Vrijednost projekta neto]+[Budget])*[Postotak]>800;800;([Vrijednost projekta neto]+[Budget])*[Postotak])))

    and everithing is calculated fine, but when I want to make sum of those data I receive "#Error" mesage.

    =Sum(IIf([Title]="Prodajna provizija";[Vrijednost projekta neto]*[Postotak];IIf([Title]="Zadovoljstvo klijenta";([Vrijednost projekta neto]+[Budget])*[Postotak];IIf([Title]="Studija slučaja" And ([Vrijednost projekta neto]+[Budget])*[Postotak]>800;800;([Vrijednost projekta neto]+[Budget])*[Postotak]))))

    Thanx in advance on your help.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Posting the error message and its code would help us in helping you!

    Moreover and at first sight, Sum returns the sum (i.e. total) of a set of values. IIf returns a single value, so what's to sum?
    Have a nice day!

  3. #3
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    If your IIF is in a query. Use a second query to Sum the first.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •