countIF in Spotfire. Unable to solve. Please help

Here's scenario... I have four columns of Year(Screenshot attached - Nex Date 1, Next Date 2, Nex Date 3, Nex Date 4). Now I want to count occurrence of Nex Date 1 column's value that should be present in all four columns. Example, In case of 2016 from Nex Date 1 column, there are 84 occurrence in Nex Date1 and 2 occurrence in Nex Date 4 column so 84+2 = 86. In same way, I want to count occurrence of every distinct value from Nex Date 1 out of all four columns. In excel it was done by Countif function, you can see that in screenshot attached, but I am unable to do it in spotfire. Please let me know the solution, may be logic or by using R Data Function. Thanks in advance.


Image icon countif.png27.05 KB

(1) Answer