Skip to main content
Solved

Monthly Amount formula in a budget with various frequencies of amounts

  • June 26, 2024
  • 4 replies
  • 40 views

Forum|alt.badge.img+2

I am creating a budget and have amounts incoming at various frequencies. I want to create a field that calculates the monthly amount based on a formula. This is the formula I have got but I get an Invalid Formula error message:


IF(
{Frequency} = "Daily", {Amount} * 30,
IF(
{Frequency} = "Weekly", {Amount} * 4.33,
IF(
{Frequency} = "Bi-weekly", {Amount} * 2.167,
IF(
{Frequency} = "Monthly", {Amount},
IF(
{Frequency} = "Quarterly", {Amount} / 3,
IF(
{Frequency} = "Twice-Annually", {Amount} / 6,
IF(
{Frequency} = "Annually", {Amount} / 12,
0 // Default case, if none of the above matches
)
)
)
)
)
)
)

How do I need to correct it?

Best answer by TheTimeSavingCo

Thank you! I now have it like this but it's still giving me an the error "Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.":

 
IF(
{Frequency} = "Daily", {Amount} * 30,
IF(
{Frequency} = "Weekly", {Amount} * 4.33,
IF(
{Frequency} = "Bi-weekly", {Amount} * 2.167,
IF(
{Frequency} = "Monthly", {Amount},
IF(
{Frequency} = "Quarterly", {Amount} / 3,
IF(
{Frequency} = "Twice-Annually", {Amount} / 6,
IF(
{Frequency} = "Annually", {Amount} / 12,
)
)
)
)
)
)

Looks like you deleted the last "0" at the end of your formula; it should be "/12, 0"? 

IF( {Frequency} = "Daily", {Amount} * 30, IF( {Frequency} = "Weekly", {Amount} * 4.33, IF( {Frequency} = "Bi-weekly", {Amount} * 2.167, IF( {Frequency} = "Monthly", {Amount}, IF( {Frequency} = "Quarterly", {Amount} / 3, IF( {Frequency} = "Twice-Annually", {Amount} / 6, IF( {Frequency} = "Annually", {Amount} / 12, 0 ) ) ) ) ) ) )

 

4 replies

TheTimeSavingCo
Forum|alt.badge.img+31

There's no commenting system for formulas I'm afraid.  Once you remove the // it'll work fine:


Forum|alt.badge.img+2
  • Author
  • New Participant
  • June 28, 2024

There's no commenting system for formulas I'm afraid.  Once you remove the // it'll work fine:


Thank you! I now have it like this but it's still giving me an the error "Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.":

 
IF(
{Frequency} = "Daily", {Amount} * 30,
IF(
{Frequency} = "Weekly", {Amount} * 4.33,
IF(
{Frequency} = "Bi-weekly", {Amount} * 2.167,
IF(
{Frequency} = "Monthly", {Amount},
IF(
{Frequency} = "Quarterly", {Amount} / 3,
IF(
{Frequency} = "Twice-Annually", {Amount} / 6,
IF(
{Frequency} = "Annually", {Amount} / 12,
)
)
)
)
)
)

TheTimeSavingCo
Forum|alt.badge.img+31

Thank you! I now have it like this but it's still giving me an the error "Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.":

 
IF(
{Frequency} = "Daily", {Amount} * 30,
IF(
{Frequency} = "Weekly", {Amount} * 4.33,
IF(
{Frequency} = "Bi-weekly", {Amount} * 2.167,
IF(
{Frequency} = "Monthly", {Amount},
IF(
{Frequency} = "Quarterly", {Amount} / 3,
IF(
{Frequency} = "Twice-Annually", {Amount} / 6,
IF(
{Frequency} = "Annually", {Amount} / 12,
)
)
)
)
)
)

Looks like you deleted the last "0" at the end of your formula; it should be "/12, 0"? 

IF( {Frequency} = "Daily", {Amount} * 30, IF( {Frequency} = "Weekly", {Amount} * 4.33, IF( {Frequency} = "Bi-weekly", {Amount} * 2.167, IF( {Frequency} = "Monthly", {Amount}, IF( {Frequency} = "Quarterly", {Amount} / 3, IF( {Frequency} = "Twice-Annually", {Amount} / 6, IF( {Frequency} = "Annually", {Amount} / 12, 0 ) ) ) ) ) ) )

 


Forum|alt.badge.img+2
  • Author
  • New Participant
  • June 29, 2024

Looks like you deleted the last "0" at the end of your formula; it should be "/12, 0"? 

IF( {Frequency} = "Daily", {Amount} * 30, IF( {Frequency} = "Weekly", {Amount} * 4.33, IF( {Frequency} = "Bi-weekly", {Amount} * 2.167, IF( {Frequency} = "Monthly", {Amount}, IF( {Frequency} = "Quarterly", {Amount} / 3, IF( {Frequency} = "Twice-Annually", {Amount} / 6, IF( {Frequency} = "Annually", {Amount} / 12, 0 ) ) ) ) ) ) )

 


Yes, that worked! Thank you so much!