Forum Discussion
setis
7 years agoPost Partisan
LOOKUPVALUE help
Dear all, I am struggling with a relative simple issue.
I have 2 tables, [Receivables] and [Payables]
These 2 tables are joined through:
Payables [External No.] to Receivables [Document No.]) on a 1 to many. (1 [Document No.] can have many [External No.])
I am trying to see which lines in [Receivables] does or does not have a match in [Payables].
I achieved this with a measure:
Invoice status =
IF(ISBLANK(
CALCULATE(COUNTA(Receivables[Document No.]);
FILTER(ALL(Receivables);
Receivables[Document No.]=(MAX('Payables[External No.])))));"Not Invoiced";"Invoiced")but I actually need this as a calculated column in the table [Receivables]I am trying different things but nothing is working for me. Last attemp was:
Inv. status(WRONG) =
IF(HASONEVALUE('Payables'[External Document No.]);
LOOKUPVALUE('Payables'[Entry No.];'Payables'[External No.];Receivables[Document No.]);"")Could someone point me in the right direction, please?setis -
Maybe this will work for you:
Column = VAR countReceivables = CALCULATE ( COUNTROWS ( Payables ), ALLEXCEPT ( Receivables, Receivables[Document No.] ) ) RETURN IF ( ISNUMBER ( countReceivables ), "Invoiced", "Not Invoiced" )
2 Replies
- ChrisMendozaResident Rockstar
setis -
Maybe this will work for you:
Column = VAR countReceivables = CALCULATE ( COUNTROWS ( Payables ), ALLEXCEPT ( Receivables, Receivables[Document No.] ) ) RETURN IF ( ISNUMBER ( countReceivables ), "Invoiced", "Not Invoiced" )- setisPost Partisan
Dear ChrisMendoza,
It does work. Thank you so much!
I really appreciate you taking the time to create a file and check this for me. I should have included a file myself. :)