Hi Impashree Shetty,
If I'm interpreting your question correctly, you should be able to just create a calculated field to find the rows with 'Leader' in the RBS column and then count them up...
I used a calculated field called "LeaderInColumn" like this to assign a value of 1 to each row with 'Leader' in the RBS column, and a 0 if it didn't exist:
if (FIND([RBS], 'Leader') != 0) THEN 1
Then you can just sum the values in LeaderInColumn by the OU dimension.
After looking at your Excel file, this is a more calculated problem than I originally thought. If I'm reading it correctly, you have to essentially loop through each record and find the substring from that record in all other records, then count the matching records. If that's the case, you might be better off using a different tool from Tableau.
If you have experience with Python, you could write a fairly straightforward function, and use the Python API to call the function through Tableau. If you don't have experience, I'd be happy to help you write a function to get the desired result.
Thanks for the reply.
I can implement this in R but the requirement is to do it in Tableau itself. So thought of posting it here and getting some help.
I want that to be dynamic and for each row. Not just for "Leader" or any static string.
Thanks for your time.
There's no easy way to create something that would be dynamic and update for every row - even in excel, this would be challenging. Effectively what you are trying to do is create a new column for each and every value in [Resource Name]. You can do that, but it would b e very cumbersome.
On the other hand, you could use Sarah's approach, and replace the string literal with a parameter for which the user enters a value.