Oracle Analytics Cloud and Server

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

XDOFX Division in RTF Template

Received Response
82
Views
4
Comments

Summary

XDOFX Division in RTF Template

Content

Hello all,

I have an RTF template as below. I want to calculate the average of how long it takes per service => total_time / volume2.

I have the xdofx in the RTF template for Average as below, but when I run it there is nothing in the Average (see result below).

Can someone please tell me what is wrong here or what is the correct way to calculate this. Thank you all so much in advance for all your help.

<?xdofx:sum(current-group()/TOT_ARR_AVAIL) div sum(current-group()/VOLUME2)?>

group ROW by OFFICER_DESCR

Officer:    OFFICER_DESCR

F OFFICER_DESCR

CPDATE

TIME_RECEIVE

TIME_DISPATCH

TIME_ARRIVE

TOT_DISP_ARR

TIME_AVAIL

TOT_ARR_AVAIL E

TOTAL_TIME

Officer Total

Volume:   VOLUME

No Standby: VOLUME2

Average: 0.00

end ROW by OFFICER_DESCR

Results:

image

Thanks.

MT

Answers

  • YGUTTIKONDA
    YGUTTIKONDA Rank 6 - Analytics Lead

    can u upload a sample RTF and data file ?

    Also check the  user guide for sdiv()

    <?xdoxslt:sdiv(num1,num2,string)?>

    Examples: <?xdoxslt:sdiv(10,0, '0')?> would

    yield '0'

    <?xdoxslt:sdiv(10,0, 'None')?> would yield

    'None'

  • Mtran
    Mtran Rank 2 - Community Beginner

    Hi Yguttikonda,

    I'm not sure how to attached or upload the RTF and the data file here.

    Can you please give me your email address so I can send you the rtf and the data file?

    Thank you so much for responding.

    Thanks.

    MT

  • YGUTTIKONDA
    YGUTTIKONDA Rank 6 - Analytics Lead

    Glad to hear that it worked. ..

  • Mtran
    Mtran Rank 2 - Community Beginner

    Hi Yguttikonda,

    I tried this and it worked.

       <?xdoxslt:div(sum(current-group()/TOT_ARR_AVAIL) , sum(current-group()/VOLUME2))?>

    Thank you so much.

    MT