Oracle Analytics Cloud and Server

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

BIP - RTF XSLT bisubtraction 2 variables

Received Response
158
Views
5
Comments

Summary

BIP - RTF XSLT bisubtraction 2 variables

Content

Hi the community,

In a BI Publisher RTF template it is required to extract 2 variables.
The extraction is done through the following statements:
<?if:../../Tax_Summary_Lines_Section_S8/Summary_Taxable_Amt_ID8!="0"?>
<?if:position()=last()?>
<?xdoxslt:set_variable($_XDOCTX,'AllTax',../../Total_Extended_Price_WF_ID23)?>
<?xdoxslt:set_variable($_XDOCTX,'Tax',../../Tax_Summary_Lines_Section_S8/Summary_Taxable_Amt_ID8)?>
<?xdoxslt:set_variable($_XDOCTX,'NonTax',xdoxslt:get_variable($_XDOCTX,'AllTax - Tax'))?>
<?end if?>
<?end if?>

Q) It is this the proper way to do the substraction <?xdoxslt:set_variable($_XDOCTX,'NonTax',xdoxslt:get_variable($_XDOCTX,'AllTax - Tax'))?>

Thanks a lot

Answers

  • Brajesh Shukla-95078
    Brajesh Shukla-95078 Rank 7 - Analytics Coach

    May i know what is your requirement?

    The one which you posted is way of subtraction with some additional logic. there are some easiest way example  <?xdofx:2-3?> you can use.

    Let us know what exactly you are looking?

  • user10488267
    user10488267 Rank 2 - Community Beginner

    Thanks for your post ...

    I try to substract 2 local variables AllTax - Tax calculated in the document

    <?xdoxslt:set_variable($_XDOCTX,'AllTax',../../Total_Extended_Price_WF_ID23)?>

    <?xdoxslt:set_variable($_XDOCTX,'Tax',../../Tax_Summary_Lines_Section_S8/Summary_Taxable_Amt_ID8)?>

    ... i tried a lot of thing like this <?xdoxslt:set_variable($_XDOCTX,'NonTax',xdoxslt:get_variable($_XDOCTX,'AllTax' - xdoxslt:get_variable($_XDOCTX,'Tax'))?> or <?xdoxslt:set_variable($_XDOCTX,'NonTax',xdoxslt:get_variable($_XDOCTX,number(AllTax) - number(Tax)))?> or ...

    Without any success ....


    Best Regards

  • Brajesh Shukla-95078
    Brajesh Shukla-95078 Rank 7 - Analytics Coach

    If I under stand correctly you would like to subtract two XML tag Total_Extended_Price_WF_ID23 and Summary_Taxable_Amt_ID8

    we can directly use subtract function like <?xdofx:2-3?>  we only need the exact level of these two tags...for that we need to analyse your XML.

    Could you please upload your sample XML

  • Brajesh Shukla-95078
    Brajesh Shukla-95078 Rank 7 - Analytics Coach

    I tried below it worked for me

    <?xdofx:Total_Extended_Price_WF_ID23 - Summary_Taxable_Amt_ID8?>

    image

  • user10488267
    user10488267 Rank 2 - Community Beginner

    Check attachment