Calculated Field- Sum of Costs

How do I create a calculated field to get the sum of costs for a date range?

Hello @jennifer.dankovic, welcome to the Quick Community!

You can do this a few different ways. If you are applying a date range filter, you honestly might not need a calculated field at all. Just filter the visual to the date period and you can add the costs field to the visual and set it to sum.

Otherwise, you could write an ifelse statement to only return cost when it is between the 2 dates. If you are setting parameters with date values, that would look like this:

ifelse({date} >= ${StartDate} AND {date} <= ${EndDate}, {costs}, NULL)

Let me know if that helps!

Hi @jennifer.dankovic,

Just checking back in since we haven’t heard from you in a bit. I wanted to see if the guidance shared earlier helped resolve your question, or if you found a solution in the meantime.

If you still have any additional questions related to your initial post, feel free to share them. Otherwise, any update you’re able to provide within the next 3 business days would be helpful for the community.

Thank you.

Hi @jennifer.dankovic,

Since I haven’t received any further updates from you, I’ll treat this inquiry as complete at this time. Please feel free to create a new post if you have more questions.

Thank you.