Restricting aggregate calculations
I have an "aircraft" resource that has this aggregate:
How can I pass in the argument to sum over the tech_logs only for the past X days?
Solution:Jump to solution
```elixir
calculate ..., expr(sum(tech_logs, field: :airborne_time_mins, query: [
filter: [expr(... ^arg(:foobar))]
])) do
argument :foobar, ......
2 Replies
You have to use calculations for this
Solution