Calculation (If Statement)

Hi everyone, hope you all are having a great day.

I have a requirement to create a specific calculation based on the year (date) and I’m seeking your guidance on how to implement this in my app.

For example, if the year of a date is 2022, I would like to select a particular column and perform a calculation. If the year of a date is 2023, will perform a calculation and the list are on an on…

Here’s the fields that needed to be use.

Date Field
{Category ClientName.Date}

Calculation Fields
for year 2022
{Category Categories_MinFee.Categories_MinFee_2022} * {Quantity}
for year 2023
{Category Categories_MinFee.Categories_MinFee_2023} * {Quantity}
for year 2024
{Category Categories_MinFee.Categories_MinFee_2024} * {Quantity}

Its purpose is to generate a historical value because Knack does not handle this situation effectively.

Hi

You’d probably want to create a new field and use a text formula such as “right({Date Field},4)” to extract the year from your date, and then use that result to perform your conditional calculations.

Dean

1 Like