Hi Folks, Following up on the same post i posted few minutes back : Re: Calculated field for matching values based on criteria in a different column
The logic provided only works for few records and for some of them the value is not updated ..I think its the case with duplicates .Can we also apply to cases where there are duplicates or triplicates or more repeating data .Can someone suggest what to do ? Or the logic given was wrong ?
Copied below question form the post
------------------------------------------------------------------------------------------------------------------
I am trying to create a calculated field based on three conditions .
I have two columns names " source system names" which has only two values 302 and 202 only and other column name "unique ID have different numerical values .
I want to create a calculated field which will display the data as shown in "calculated field display " column. I need some help to write a logic on this .I have not done something like this before in tableau .Can someone help me out .I have around 0.5 million rows so need a logic that would work for this size of data .
202 RECORD ONLY - when unique ID does not exists in row having source system as 302 .(example row 1,3 and 4)
302 RECORD ONLY - When unique ID does not exists in row having source system as 202.(example row 9,11 and 12)
EXISTS in both 302 and 202 - when unique ID is same for source system names 302 and 202 .(2 and 10 , 5 and 8 and 6 and 7)
Kindly help me to create a calculated field with this logic .
You can left join the data with itself using the join criteria of Unique ID = Unique ID and Source System Name <> Source System Name. Then create a calculated field to look at the value in the joined data, if it is not null, then it exists in both, otherwise it exists only on the left side.