Oracle Analytics Cloud and Server

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

Adding Round in If condition in RTF template

Received Response
131
Views
8
Comments

Summary

Adding Round in If condition in RTF template

Content

Hi Team,

I am trying to add Round in If condition but i am unable to add in the RTF template. Kindly help me sort it out.

<?xdofx: if round(number(Value),-2) < number(Value)?>

Thanks,

Kishore

Answers

  • Venkat Thota - BIP
    Venkat Thota - BIP Rank 7 - Analytics Coach

    Try this

    <?xdofx: if round(UNIT_COST,-2)<1  then '123' else '321' end if?>

    if not share you template and xml.

  • Venkat Thota - BIP
    Venkat Thota - BIP Rank 7 - Analytics Coach

    Try this

    <?for-each:DiscountTaken?>

    <?xdofx: if round(VALUE,-2)>VALUE then round(VALUE,2)+100 else round(VALUE,2) end if?>  

    <?end for-each?>

  • Venkat Thota - BIP
    Venkat Thota - BIP Rank 7 - Analytics Coach

    Is data source is of sql type ? then you can handle all these calculations at source level instead of Template level.

  • K S-92721
    K S-92721 Rank 3 - Community Apprentice

    Hi,

    As per the syntax you have told i built a query and its working fine

    <?xdofx: if round(Value,-2)>=5000 then round(Value,2)+100 else round(Value,2) end if?>

    but i need to replace '5000' with the column name 'Value' when i do that is not working and throws error

    Thanks,

    Kishore

  • Saravanan V
    Saravanan V Rank 1 - Community Starter

    Hi,

    I try your method too but its not working for me. I have attached my rtf and xml.

    PFA.,

    -Thanks,

    Kishore.S

  • K S-92721
    K S-92721 Rank 3 - Community Apprentice

    Hi,

    As per my analysis when i add XDOFX to the If condition the if condition is not working

    but to add round function i need to add XDOFX.

    Thanks,

    Kishore

  • K S-92721
    K S-92721 Rank 3 - Community Apprentice

    Hi,

    Since i am not able to attach with my account i used my friends account to add attachment.

    Kindly see to it.

    Thanks,

    Kishore

  • K S-92721
    K S-92721 Rank 3 - Community Apprentice

    Hi,

    My issue is resolved. Its is due to change in MS word version, i tried in release 2013 and it worked.

    Thanks for the help.

    Thanks,

    Kishore