Oracle Analytics Cloud and Server

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

date format now working after maximum function is applied in Template

Received Response
249
Views
7
Comments

Summary

date format now working after maximum function is applied in Template

Content

Good Morning,

I am creating a simple RTF template in which I have done grouping at the template level. But in one of the fields I want to show the maximum Transaction date within the group. The transaction date is coming in canonical format from the data source. So I used extended function maximum as below:

<?xdoxslt:maximum(current-group()//TRANSACTION_DATE)?>

and set the format to dd-MMM-yy in the template.

But the output is being displayed as

Transaction Date

20170522

20170523

20161101

I also tried maximum_date function as below:

<?xdoxslt:maximum_date(current-group()//TRANSACTION_DATE)?>

But the output is even more unexpected:

1495411200

000

1495497600

000

1477958400

000

Any ideas how can I resolve this issue. Is there anyway I can use format-date over the output returned from maximum function?

Thanks,

Anwar

Answers

  • Fanwar
    Fanwar Rank 2 - Community Beginner

    I could but I would have to modify DM heavily as it is a very complex report. So as a workaround I took the route of grouping in template. I wonder why the function doesn't return the output in canonical format. The value returned by maximum function is correct but not in correct format.

  • YGUTTIKONDA
    YGUTTIKONDA Rank 6 - Analytics Lead

    Anwar - I do not think the MAXIMUM is supported function .. is there a chance you can apply the logic in your DM ?

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

    use xdofx function instead of xdoxslt , here available_date will be your tarnsaction_date

    <?xdofx:to_char(max(AVAILABLE_DATE),’mm-dd’)?>

    <?xdofx:to_char(max(current-group()//TRANSACTION_DATE),'mm-dd-yyyy')?>

  • Fanwar
    Fanwar Rank 2 - Community Beginner

    Hi 2807661,

    I tried xdofx way too but it didn't work. It keeps returning null.

    I would try to move the logic to data model.

    Thanks,

    Anwar.

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

    It is working for me , might be problem with your data ,

    upload Template and Xml ,Thanks

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

    what is timezone of database where data is extracting ? also bi publisher installed time zone ?

  • Fanwar
    Fanwar Rank 2 - Community Beginner

    Hi 2807661,

    I took out current-group() and used the function on TRANSACTION_DATE as

    <?xdofx:to_char(max(TRANSACTION_DATE), 'dd-mm-yy')?>

    Strangely it is working with the exception that it always increment one day to all dates.

    Thanks,

    Anwar