0

Sum Specific records of certain year based on a date field

Hi All,

Is there a way to make ninox recognise a certain year of a date field.

i.e I have a date field in one table

a count of people in the table

I would like to get a total count of people in a certain year.

my current code is:

let 'year':=Year
sum((select 'table')['date field' = 'year'.people)

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Fred
    • Fred
    • 5 mths ago
    • Reported - view

    Try this:

    let year:=Year
    cnt((select 'table')[year('date field') = year].people)
    

    Assuming that the field Year is a number field containing data that consists of a four numbers that matches common years.

    Also you might want to use cnt (or count) as it will count the number of records that match your search. Sum will try to add the field people and it is probably not a number field.

    Like
      • Admin
      • Admin.11
      • 5 mths ago
      • Reported - view

      Fred Thanks 

      Worked Perfectly, Thought it was something simple

      Like
Like Follow
  • 5 mths agoLast active
  • 2Replies
  • 41Views
  • 2 Following