Count/sum/avg values based on the date range control

Hello community!

i’m trying to:

  • calculate and display values on a page based on the X columns values in a table filtered by date range controls.

So far I was able to calculate total number of the values. count()
Need to calculate SUM, AVG, MAX/MIN etc.

Formula:

FormulaMap(
  Refueling.Date,
  CurrentValue >= [date fleet].Split(",").First().toDate() AND
    CurrentValue <= [date fleet].Split(",").last().toDate()
)
  .Filter(
    CurrentValue.Contains(true)
  )
  .Count()

Must be related to the: match() , filter(), formulamap() , lookup() but I don’t know how to implement. Please help!

Okay. Found a solution. it was more simple than i thought.

Refueling
  .Filter(
    Date >= [date fleet].Split(",").First().toDate() AND
      Date <= [date fleet].Split(",").last().toDate()
  )
  .Cost
  .Sum()

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.