Oracle Analytics Cloud and Server

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

How to get max date from varchar date prompt

Received Response
23
Views
5
Comments
user652652
user652652 Rank 4 - Community Specialist

Hi Experts,

we have a dashboard prompt (varchar) with values :    

JAN-15,FEB-16,MAR-16

and user can select mupltiple values

We want to get the maximum selected date from abovle values into a presentation variable.

How we can achive it in OBIEE.

Answers

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    Shortest answer: You don't since by choosing varchar you have chosen to disregard any notion of data types and the advantages and possibilities that data types provide you with.

  • As extension to what Christian said, there is also another factor to keep in mind: you select values from a prompt and you want to set a variable with one of those values. Variables are set by prompts, so the variable will old all the selected values.

    It sounds like a XY Problem (http://xyproblem.info/ ), so express the real need as that's probably the one which can be solved more easily than going random possible way to set a variable which just move the problem somewhere else ...

  • user652652
    user652652 Rank 4 - Community Specialist

    Thanks for your suggestion.

    We have an analysis of around 5 dimensions and 4 measure.

    We need to calculate a measure in this analysis with the rate(Measure*rate). This rate is the rate for the maximum period from the selected prompts.

    Period Prompt(Varchar) is having values like JAN-15, FEB-16, MAR-16. I tried it with a case statement but it also returns 'NULL' values.

    Because this required in a column formula, we cant apply filter the whole analysis like not null, etc.

    Note: The rate in rpd is not have any aggragation.

    Please suggest.

  • Joel
    Joel Rank 8 - Analytics Strategist

    You can get rid of all these issues by properly modelling your repository. Dates will need to be setup as dates and measures will need to be setup with aggregation as a starting point as well as logical dimensions with hierarchies etc. Once all of that has been done then all the issues you’ve highlighted will be resolved.

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    +1 to Joel. Fix the RPD and model things correctly. Working with an RPD that doesn't support your analysis needs is like trying to build a house on quicksand.