1 Reply Latest reply on Oct 6, 2009 8:32 AM by philmodjunk

    Complex value count

    beckett85_1

      Title

      Complex value count

      Post

      ok at the moment i have a formula

       

      ValueCount ( FilterValues ( List ( Jobs For Projects::STATUS ) ; "complete¶completed, pending payment" ) )

       

      Counds the related records in a project where by the status is "complete" or "completed pending payment"

       

      is it possible to extend the count to add in job type so in my jobs table i will have Status As wel as type

      so if there are two jobs under the type 'kitchen' and 1 contains 'complete' it would return 1

       

      thanks in advance

        • 1. Re: Complex value count
          philmodjunk
            

          You can modify your relationship to do this. You already have a relationship for the table occurrence "Jobs For Projects". If this count is the only time you use this relationship, we can modify it. If it has other uses, you'll need to create a new table occurrence so that "Jobs For Projcects" remains unchanged.

           

          Either way, define a new global field "gType" and include it in your new or modified relationship.

           

          If you modify the existing relationship, you'd get:

           

          <other match field(s) for Jobs For Projects> AND

          TableOccurrence::gType = Jobs For Projects::Type

           

          You can then place gType on a layout and format it with a value list of types. Select kitchen in this field and your calculation will count the number  of completed kitchen projects.