Oracle Analytics Cloud and Server

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

How do you add two fields in BI Publisher for use in if-then-else statement?

Received Response
101
Views
2
Comments

Summary

How do you add two fields in BI Publisher for use in if-then-else statement?

Content

We have a BI Publisher Report that needs to add two fields together and then have conditional logic applied to the result.  The fields being combined are from two different queries combined on the BI Publisher Template.  The report should display the word Eligible if the monthly rate plus the monthly longevity rate is greater than 3,333. If + > 3,333 then 'Eligible' This is a Microsoft Word template. Do you have any suggestions on how to get this accomplished? Thanks

Answers

  • Sherry George
    Sherry George Rank 7 - Analytics & AI Coach

    Something like this

    <?choose:?><?when:(monthly_rate+monthly_longevity>3333)?>Eligible<?end when?><?otherwise:?>Not eligible<?end otherwise?><?end choose?>

  • Lynngat
    Lynngat Rank 2 - Community Beginner

    I used the following code and the report is working much better now.

    3333) or E.MONTHLY_RT+LGT>3333) then 'Eligible' else 'Not Eligible' end if?>

    I used the xdofx functionality since the field LGT was not always in the data.  Once I switched to this logic, the data was returned correctly.