Oracle Analytics Cloud and Server

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

Conditional display in Excel templates

Received Response
605
Views
4
Comments

Summary

Conditional display in Excel templates

Content

Hi All,

I have an xls template, where I need to display cell data (Egs Column A) only if another cell (Egs Column B) contains data.

Is there a way to use  <?if:condition?>   <?end if?> in Excel templates similar to how we used them in RTF?

If this is not the right format, how can we display field data conditionally in the template?

Thanks!

Answers

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

    Hi,

    You can use Excel if condition .

    In your case "I need to display cell data (Egs Column A) only if another cell (Egs Column B) contains data"

    in this case for cell A you can write like below

    =IF(B1="","",A1) --it means If B is blank then A also will be blank and if B is not blank then it will display value of A

    Above is easiest way,

    Another way is to define the Template tags and use it on you excel

    e.g. as below

    image

    Regards,

    Brajesh

  • sumanths
    sumanths Rank 3 - Community Apprentice

    Brajesh - Could you please share the conditional tags that you used in XDO_METADATA tab? I was not able to use the traditional IF - END IF in this tab.

    It would be of great help.

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

    Hi ,

    Can you create the XDO_METADATA for if condition and use it on excel. 

    <xsl:if test=".//INVOICE_TYPE='PREPAYMENT'">   </xsl:if>

    Regards,

    Brajesh

  • sumanths
    sumanths Rank 3 - Community Apprentice

    Thanks Brajesh for the pointers,

    It helped:

    Provide xsl:if condition in column B:

    <xsl:if test="GST_TAX_RATE_CODE!=''"> <xsl:value-of select=".//TAXABLE_AMOUNT"/> </xsl:if>

    (Display Taxable Amount only if a given Tax is applied)

    image

    Thanks!