Hi @Nicky,
In this case, I would use the following XPath expression:
iif(@CustomerRef_WLP = ‘’ and @CustTrans_Invoice ,
iif(month(@CustTrans_TransDate) = 1, concat(‘January’, ’ usage’),
iif(month(@CustTrans_TransDate) = 2, concat(‘February’, ’ usage’),
iif(month(@CustTrans_TransDate) = 3, concat(‘March’, ’ usage’),
iif(month(@CustTrans_TransDate) = 4, concat(‘April’, ’ usage’),
iif(month(@CustTrans_TransDate) = 5, concat(‘May’, ’ usage’),
iif(month(@CustTrans_TransDate) = 6, concat(‘June’, ’ usage’),
iif(month(@CustTrans_TransDate) = 7, concat(‘July’, ’ usage’),
iif(month(@CustTrans_TransDate) = 8, concat(‘August’, ’ usage’),
iif(month(@CustTrans_TransDate) = 9, concat(‘September’, ’ usage’),
iif(month(@CustTrans_TransDate) = 10, concat(‘October’, ’ usage’),
iif(month(@CustTrans_TransDate) = 11, concat(‘November’, ’ usage’),
iif(month(@CustTrans_TransDate) = 12, concat(‘December’, ’ usage’), ‘’)))))))))))),
@CustomerRef_WLP)
This XPath expression checks if @CustomerRef_WLP is empty and if @CustTrans_Invoice starts with “ARFT”. If both conditions are true, it returns the transaction month from @CustTrans_TransDate with the corresponding month name followed by “usage” (e.g., “January usage”). If these conditions are not met, it returns @CustomerRef_WLP.
In short: It outputs “Month usage” based on the transaction date if the invoice starts with “ARFT” and @CustomerRef_WLP is empty, otherwise it returns @CustomerRef_WLP.
Google PIA Statement_AmirTest.docx (77.6 KB)