Hello, I need help with a calculated formula. In my dataset, I have the following structure:
alias (string) | widget_name (string) | alias_chain (string)
trobert | widget name 1 | trobert,rjohn,wright,etc.
pmike | widget name 2 | trobert,rjohn,wright,etc.
lkelly | widget name 2 | trobert,rjohn,wright,etc.
etc.
I would like to add a calculated field to count the total number of widgets for each Alias found in the alias_chain. In the example above, trobert shows up on three places, so trobert’s count in the new calculated field would be 3, pmike and lkelly’s count would be 0.
I tried the following formula which is working when searching value from a parameter, but when I replace it with alias, it doesn’t work.
countIf({widget_name}, contains({alias_chain}, {alias}))
Ultimately I would like the count to show up as another table column in the visual view as follows:
alias (string) | widget_name (string) | alias_chain (string) | count
trobert | widget name 1 | trobert,rjohn,wright,etc. | 3
pmike | widget name 2 | trobert,rjohn,wright,etc. | 0
lkelly | widget name 2 | trobert,rjohn,wright,etc. | 0