Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to count unique faces (FaceID field) which appeared both in “Left wing” and “Exit 1” Sources, this is a sample data:
if I’m using this expression:
count(distinct {$<[Source]={'Left Wing','Exit 1'}>} FaceID)
I’ll get 2 (because it calculates faces which appeared in “Exit 1” or “Left Wing”)
I'm expecting to get 1 because only faceID 2190 appeared both in "Exit 1" and "Left Wing"
Thanks for the help,
Eli.
Sorry my bad, try this instead
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) * P({<[Source] = {'Exit 1'}>})>} FaceID)
changed '+' (union) to '*' (intersection)
hi @EliGohar
strange , have a look at the attach app ,
this expression work as expected
Try this
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) + P({<[Source] = {'Exit 1'}>})>} FaceID)
@sunny_talwar Thanks but it still counts faces which appeared in “Exit 1” or “Left Wing”.
Sorry my bad, try this instead
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) * P({<[Source] = {'Exit 1'}>})>} FaceID)
changed '+' (union) to '*' (intersection)
@sunny_talwar You Rock!
@sunny_talwar I have another question:
I want to add another condition:
Count unique faces (FaceID field) which appeared both in “Left wing” and “Exit 1” Sources and not appeared in "Entrance 2" source.
Tried the following expression:
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) * P({<[Source] = {'Exit 1'}>}) * P({<[Source] -= {'Entrance 2'}>})>} FaceID)
But no luck.
Any idea?
Thanks.
hi
try this
Count(DISTINCT {$<FaceID = P({<[Source] = {'Left Wing'}>}) * P({<[Source] = {'Exit 1'}>}) - P({<[Source] = {'Entrance 2'}>})>} FaceID)
hi @EliGohar
strange , have a look at the attach app ,
this expression work as expected
@lironbaram Thanks!