Forum Discussion
SnymanGrobler
3 years agoFrequent Visitor
Compare 2 Columns, Return 3 values
Hi, I want to compare two columns on the same table. If the Columns match it should return 3. If thet dont match return 2. If both are blank return 1. I want to use these values in conditi...
- 3 years ago
SnymanGrobler
TryMatch = SWITCH ( TRUE (), Table[Column1] = BLANK ( ) && Table[Column2] = BLANK ( ), 1, Table[Column1] = Table[Column2], 3, 2 )or
Match = SWITCH ( TRUE (), Table[Column1] & Table[Column2] = "", 1, Table[Column1] = Table[Column2], 3, 2 )
SnymanGrobler
3 years agoFrequent Visitor
Hi, tamerj1
This does not work.
My conditional formatting looks as follows:
With this logic it still only returns green and yellow colors. Example:
Do you have any idea why this is the case?
Thanks
tamerj1
3 years agoCommunity Champion
SnymanGrobler
Try
Match =
SWITCH (
TRUE (),
Table[Column1] = BLANK ( ) && Table[Column2] = BLANK ( ), 1,
Table[Column1] = Table[Column2], 3,
2
)
or
Match =
SWITCH (
TRUE (),
Table[Column1] & Table[Column2] = "", 1,
Table[Column1] = Table[Column2], 3,
2
)- SnymanGrobler3 years agoFrequent Visitor
Thank you very much, second solution worked.