t_customer_reference is not a calculated field. It has just all the trade codes and some are repeated for the different counterparty . I need to get as a result how many times a code is repeated . Also counterparty is not a calculated field.
Both field contain strings value.
eg . t_customer_reference = “23473646388389” and Counterparty = “bob”, "mark etc.
Then you should raise a ticket to AWS Support - Creating support cases and case management - AWS Support (amazon.com)
But out of curiosity, does the same happen when you choose a different group-by level or try to count something else with or without a group-by level? I can’t reproduce the error and would like to know which part is causing it.
After trying a few things I realized that the LAC custom field formula work if i create the field in the analysis. I previously was trying to create the field on the dataset where i usually prefer to create my calculated fields.
Unfortunately I don’t think this formula is useful for what I’m trying to achieve.
My end result should be returning a Boolean that identifies which trade codes are unique and which trade codes are not unique so i can then filter my visualizations to contain only unique trades or not unique trade codes.
sorry for the late reply, but something like:
ifelse(count(your field) < 2, what you want as a result, NULL)
could work. That should be the right result, first asking if the count is less than two - so unique and if it is you get the desired outcome for this fields.
Thank you for getting back to me.
I have tried that formula but I cant use the result as a filter. It just returns an aggregate if I put it a table and if I use it in a filter I get an error when retrieving the values.
Ok, i tried it with some dummy data:
ifelse(count({Contact Name}, [{Contact Name}])<2,‘Unique’,‘Not Unique’)
Maybe this can help, it makes the filter also easy - it should be a custom filter with the values Unique and Not Unique.
It gave every contact name the value unique, which is unique and all the other not unique and counted them.