# Cross table check not working

**URL:** <https://forum.certara.com/t/cross-table-check-not-working/466>\
**Category:** SDTM\
**Created:** [July 5, 2013, 11:42pm UTC](https://forum.certara.com/t/cross-table-check-not-working/466 "2013-07-05T23:42:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugh\_Glover](https://avatars.discourse-cdn.com/v4/letter/h/d78d45/32.png) [@Hugh\_Glover](https://forum.certara.com/u/Hugh_Glover)\
**Post date:** [July 5, 2013, 11:42pm UTC](https://forum.certara.com/t/cross-table-check-not-working/466/1 "2013-07-05T23:42:05Z")

</div>

I have a custom check that matches AE and DS on USUBJID. I want to check that for a given value of DS.DSDECOD there is a specific value set for AE.AEACN. However I don’t think there are any USUBJID values in common withe these combination but what I get out of the report is all the values in DS that match the criteria in DS, just as if I hadn’t put the cross reference lunk to AE.

Is this something openCDISC just can’t do, or am I missing something here? I’ve copied the text of my rule below. I’m running v1.4 downlaoded today.

Thanks

Hugh

\<val:Lookup ID=“XX0001”

Variable=“USUBJID == USUBJID”

From=“AE”

Where=“AEACN @neqic ‘NOT APPLICABLE’ @and AEACN !=‘’ @and USUBJID!=‘’”

When=“DSDECOD @eqic ‘DID NOT MEET INC/EXC CRITERIA’ @and USUBJID!=‘’”

Message=“Incorrect AE Action for screening failure”

Description=“AE.AEACN not set to NOT APPLICABLE for Screening failures”

Category=“Presence” Type=“Error”/\>
