Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have to take ID count and have to compare between String and Compare String (like we have one to many association)
but for example - here I have to take count same in both the fields - so output should be 25
=COUNT(Aggr(COUNT( {<String=P([Compare String])>} DISTINCT ID),ID)) - this expression not giving correct result
70 is taking all the 4 records count, but it should be count for same records.
I'm expecting below result with out selection compare string
Note: only the matching selections should be calculated between the two fields.
@marcus_sommer, @Kushal_Chawda, @MarcoWedel, @tresesco and Experts - can you please take a look
Thanks in Advance!
Modify like this
COUNT( {<String=P([Compare String]), ID={"=Count(DISTINCT String) = Count(DISTINCT [Compare String])"}>} DISTINCT ID)
@qv_testing If you have primary Key in table then try below expression.
=count({<Primary_Key= {"=String=[Compare String]"}>}DISTINCT ID)
If you don't have primary Key then you can create it using RowNo() function in script
LOAD RowNo() as Key,
[Compare String],
ID,
String
FROM Data;
then below expression
=count({<Key= {"=String=[Compare String]"}>}DISTINCT ID)
If you don't want to create key in script then simply try below expression
=COUNT(distinct if(String=[Compare String],ID))
@qv_testing You can try the below expression:
count (distinct if(string=[Compare String]) ,ID))
Let us know if this has resolved your issue.