Oracle Analytics Cloud and Server

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

urgent : how to write a condition in rtf

Received Response
86
Views
4
Comments

Summary

urgent : how to write a condition in rtf

Content

in bi publisher template, if there are multiple same values in a field( for eg: tax name for 3 items are same and i want them to be displayed in one row with their respective tax_amount added in the same row), how will i do it?

 

like for 3 items, two tax_names are assigned cgst9% whose tax_amount is 90 and sgst9%, whose tax_amount is 10 .now i dont want them to be displayed individually in many rows,, but just in two rows, with their tax_amounts summed as 270 in one row and 30 in second row.

 

cgst9%    270

sgst9%    30

 

also if these tax_names are different, then they should not get added

 

cgst2%   50

sgst2%   60

cgst3%   40

sgst3%   20

Tagged:

Answers

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

    1. if you have two different tags in XML like CGST and SGST you can directly use <?sum(cgst)?> or <?sum(sgst)?> to get respective amount

    2. if you have single TAX_AMOUNT tag in xml and along with that you have one more tag TAX_CODE to identify weather its SGST or CGST you can use below to get sum

    to get sum of CGST : <?sum(TAX_AMOUNT[../TAX_CODE='CGST'])?>

    to get sum of SGST : <?sum(TAX_AMOUNT[../TAX_CODE='SGST'])?>

  • Dir_Pal
    Dir_Pal Rank 6 - Analytics Lead

    <?xdofx:if  statement= XXX then 'mmm'

    else if statement= = 'YYY'  then 'dddd'

    end if?>

  • Rashmi
    Rashmi Rank 1 - Community Starter

    i wanted it with the help of if else condition. if the tax names are same they must occur once and their amount must get added.

    and if the tax_names are not same they should repeat with their values in front

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

    Its same as second case correct  (<?sum(TAX_AMOUNT[../TAX_CODE='SGST'])?> ) ?

    Only put this sum inside if example

    <?if:TAX_CODE='SGST'?>   <?TAX_CODE?>  : <?sum(TAX_AMOUNT[../TAX_CODE='SGST'])?>  <?end if?>

    This will print SGST sum only if SGST tax is there.

    If still it doesnot fulfill you requirement please provide snapshot of your XML data it will be easy to guide you