Count frequency of data combination at column level in dataset ?

Hi ,

 

Want to count same combination of two data column  in dataset.

Test Dataset -

             Column 1 Column 2 Column 3

 Row 1 -     A           B             C

 Row 2-      A           B             D

 Row 3 -     C           B             E

 Row 4-      C           A             F

 Row 5-      C           G             H

 

Here i want to put one validation that combination of row 1 and row 2 should not be same . For that i need one frequency function which can return frequency of data in Column A & Column B. Here we have A & B coming in two rows which should not like that.

 

 

Applied approach.

 

 

I applied this approach. But i have one  issue in this approach. As per requirement. I need to match combination of two columns in one dataset . But when i am trying to put this condition its checking count correct but not at horizontal level its checking vertical level. I mean if i have data like 

B 1 
B 2 
C 3 
D 2 
B 3

In this case its showing error for row 2 (B 2). because count of both is more than one irrespective of any row. But our requirement is to check this combination at row level and it should give use count of that.

Can you help me in that. I am sharing code snipped .


validations: {
if(or(rule!APN_isBlank(ri!Data[ri!index].sgId),rule!APN_isBlank(ri!Data[ri!index].mtId)),{},if(
and(
count(
whereContains(
ri!Data[ri!index].sgId,
local!scData.sgId
)
) > 1,
count(
whereContains(
ri!Data[ri!index].mtId,
local!scData.mtId
)
) > 1
),
"Duplicate Combination ",
{}
))
}

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data