Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Need help on Nested IF condition

Hi 

 

 

I wish to map word "Increased By" & Decreased By" according to it's occurance in file . please help

 

 

Excel Data 

8 Replies

  • Anonymous 

    is this what you want?

    Column = 
    VAR last=maxx(FILTER('Table','Table'[Index]=EARLIER('Table'[Index])-1),'Table'[% Diff])
    return if(ISBLANK(last),"increased by",if(last<'Table'[% Diff],"increased by","decreased by"))

    pls see the attachment below

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your quick response,

       

      All down trangle should be show as "Decreased By" and up trangle should show "Increased By" 

      Please help on this 
      Thanks again

       

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        Anonymous 

        May I know what's wrong with the solution I provided?

  • Anonymous 

    do you want to compare the diff% and previous month%diff?

    if so, you can just try this

    Column 2 = IF('Table'[% Diff]>='Table'[Previous Month % Diff],"Increase","Decrease")