Oracle Analytics Cloud and Server

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

How to get maximum & minimum date between 2 dates in OBI

Received Response
1
Views
3
Comments
Periyasamy Chenniyappan
Periyasamy Chenniyappan Rank 1 - Community Starter

Hi All,

I have 2 date field StartDate & EndDate. Now I want to take maximum date between those 2 dates. Is there any function which I can use to derive that value.

Note: This OBI is an inbuilt system which coming with Oracle Sales Cloud. So I don't have access to repository and all. I have access only to the available subject area which are inbuilt.

Thanks,

BigGod

Answers

  • cesar.advincula.o
    cesar.advincula.o Rank 6 - Analytics Lead

    Heello, first i get your point about the cloud(you cant Access rpd), but i dont understand about the max between two dates ,  you get the difference which its based on months, days, etc. Please, Could you explain in more detail or give an example of what do you want

    Because right now, i undersantd, That you have two columns and may be Could be possible this:

    Minimum:

    Case when startdate<endate then startdate else enddate end

    Maximum:

    Case when startdate >enddate then startdate else enddate end

    . Kind regards

  • Periyasamy Chenniyappan
    Periyasamy Chenniyappan Rank 1 - Community Starter

    Hi Cesar,

    Already I have developed the expression using CASE(if) statement.

    Thanks for your reply.

    Regards,

    BigGod

  • cesar.advincula.o
    cesar.advincula.o Rank 6 - Analytics Lead

    hello, please do you mind to write in detail, and whats about your problem in the use of case statement, if you want to compare date its enough, i want to help you, however i need more clues. Kind regards