Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Percentage Change Division By Zero

Hello,

 

I'm using a matrix and trying to show percentage growth year over year. I've tried using an IF expression to correct, but it only fixes one of the 2 possible scenarios. I need the result to either by positive 100% if there is no value for the previous year, or -100% if there is no value for the current year.

 

Any suggestions? 

 

 

  • Hi Anonymous ,

    Wrap the measure or column with an Nested If measure = IF(ISBLANK(table[x]),100%,IF(ISBLANK(table[y]), -100%, [your measure])
    This should give you the three outcomes that you are looking to see.
    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
    Nathaniel

3 Replies

  • Nathaniel_C's avatar
    Nathaniel_C
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous ,

    Wrap the measure or column with an Nested If measure = IF(ISBLANK(table[x]),100%,IF(ISBLANK(table[y]), -100%, [your measure])
    This should give you the three outcomes that you are looking to see.
    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
    Nathaniel

    • Anonymous's avatar
      Anonymous
      Not applicable

      Nathaniel_C 

       

      Thank you so much! This worked like a charm. Appreciate the response.