Hi everyone
I have two tables: contracts and postings, both are linked by contract id. There can be none or several entries in postings for each contract.
I want to count the number of contracts with a certain status and no entry in postings. So I guess I need to aggregate the number of postings, but how am I able to put this as a condition in the set expression?
Aggregation of postings per contract ID, replacing missings with "0":
=if(isnull(Aggr(Count({<Posting_Transaktionsstatus_Zahlung={'Erfasst'},Posting_storniert={0}>}distinct [%Posting_UID]), [%Vertrag_UID])),0,Aggr(Count({<Posting_Transaktionsstatus_Zahlung={'Erfasst'},Posting_storniert={0}>}distinct [%Posting_UID]), [%Vertrag_UID]))
This is the count of contracts - how do I put the statement above in here to count only those with 0 postings?
Count({<Vertrag_Status = {'Annullation'}>}distinct [%Vertrag_UID])
Thanks in advance for your help.