Oracle Analytics Publisher

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How to use if statement for comparing dates in BIP template

Received Response
12
Views
2
Comments
Rank 4 - Community Specialist

Summary:

How to use if statement for comparing dates in BIP template

Content (please ensure you mask any confidential information):

I have customised the Customer Statement Data Model to show me the apply_date of the payment. Now I wish to show payments only where the apply_date is before the statement_date. I have put in the following conditions to try and achieve this.

<?if:CDC_PAYMENT_AMT=''?>0<?end if?>

<?if:CDC_PAYMENT_AMT!='' and CDC_APPLY_DATE <= STATEMENT_DATE?><?CDC_PAYMENT_AMT?><?end if?>

<?if:CDC_PAYMENT_AMT!='' and CDC_APPLY_DATE > STATEMENT_DATE?>0<?end if?>

All my payment amount are however presenting as null values which is incorrect. There are payments that should appear and some should appear as 0
I have uploaded the rtf and here is snippets of the xml where you can see the statement_date and also the cdc_apply_Date.

So in this particular example the apply date is before statement date therefore the payment_amount should pull through as 4664.40 but it is pulling as null value

Version (include the version you are using, if applicable):



Code Snippet (add any code snippets that support your topic, if applicable):

Answers

  • Rank 1 - Community Starter

    Hi,

    Did you get the solution to this issue?

    Regards,

    Mayur

  • Rank 6 - Analytics Lead

    If statements in an RTF do not translate directly to eText.

    You can use a DISPLAY CONDITION to skip rows.

    If you are testing the values for one cell of a data table you can use an IF in that cell.

    Use upper case:

    IF whatever THEN whatever ELSE whatever END IF

    https://docs.oracle.com/middleware/12213/bip/BIPRD/GUID-8ADD70BC-FB9B-4145-8020-E74FE256839C.htm#GUID-F7A1A77B-F8D7-4C00-8183-6CA3B269A8E1

    Rgds,

    Kevin

Welcome!

It looks like you're new here. Sign in or register to get started.