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)

2 replies

null
    • Fred
    • 1 yr 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.

      • Admin.11
      • 1 yr ago
      • Reported - view

      Fred Thanks 

      Worked Perfectly, Thought it was something simple

Content aside

  • 1 yr agoLast active
  • 2Replies
  • 107Views
  • 2 Following