Forum Discussion

Suhil's avatar
Suhil
Frequent Visitor
3 years ago
Solved

compare two columns containing null or 0 value.

How should we compare two columns containing null or 0 value. 

 

Unable to properly do conditional formating after that

logic used : if column 2< column1,0,1)

Here we are comparing if 0.97< 0 ( if column2 < Column 1),column2 should be green but we are still getting red.

It should be green as 0.97 greater than 0

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Suhil ,

     

    It works on my device.

    Column = IF([Column2]<[Column1],"red","green")

    If possible, please provide more details about your sample data and expected results.

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

    • Suhil's avatar
      Suhil
      Frequent Visitor
      new = IF([column1]<[column0],0,1). This is what i have issued. Then 0 for red in conditional formating and 1 for gree. But if column 1 is null then this logic not working.
      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Suhil ,

         

        It works on my device.

        Column = IF([Column2]<[Column1],"red","green")

        If possible, please provide more details about your sample data and expected results.

         

        Best Regards,

        Stephen Tao

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.