Oracle Analytics Cloud and Server

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

OAC - Auto selection of Current Date in List Filter

Received Response
149
Views
18
Comments
2»

Answers

  • Hasan Sd
    Hasan Sd Rank 5 - Community Champion

    Dear @Jestin Rajan ,Thank you for the response .We checked and found that ,in dataset ,the datatype is already Date and Format (dd/MM/yyyy)  as shown below: Pls advise how to resolve this ? We currently have 40-45 visualizations like this and we have to manually change the Filter date to current date every single Day in all of them and it's very time consuming….

    image.png image.png
  • Jestin Rajan
    Jestin Rajan Rank 4 - Community Specialist

    Haven't you tried the second approach in my earlier comment ?

  • Hasan Sd
    Hasan Sd Rank 5 - Community Champion

    Dear @Jestin Rajan ,we didn't fully understood the second approach ,is it something like below ? .

    image.png
  • Jestin Rajan
    Jestin Rajan Rank 4 - Community Specialist

    No, not referencing the parameter in the metric — just use CAST([Sales Date] AS DATE) and use this new field instead of Sales Date in all your visuals.

  • Hasan Sd
    Hasan Sd Rank 5 - Community Champion

    Ok @Jestin Rajan , As suggested we have created the calculation(shown below) and used it .However now the date format in filter list is changed to MM/dd/yyyy ,Also the earlier created parameter(using logical sql) is not visible for binding(As shown below). We tried by changing the parameter DataType to Date→Auto →dd/MM/yyyy also ,but still not visible for binding. Pls advise what should we do now ?Thank you…

    image.png image.png
  • Hi @Hasan Sd ,

    As all this start looking "complicated" for something that should be fairly simple, just a quick question: does the column you are using as filter (the one that you use as type list and want to select the current date) always contains the current date? Or that list of values can have gaps and you are trying to select the most recent date from the list being either today (current date) or the past date being the closest to today?

    Just to be sure to fully understand what you are dealing with.

    Because in all honesty, I would expect a filter on a date column to be able to always select current date fairly easily…

  • Hasan Sd
    Hasan Sd Rank 5 - Community Champion

    Hii @Gianni Ceresa .The column mostly have the current dates data, it's less often to not have current Dates data. So list of values can have gaps and we are trying to select the most recent date from the list being either today (current date) or the past date being the closest to today(if today's date data is not available)….

    Hope this answers your question…

  • Jestin Rajan
    Jestin Rajan Rank 4 - Community Specialist

    @Hasan Sd

    I don’t want to complicate this further, but one last thing you could try is creating a new parameter by clicking on the Create Parameter option and using the same LSQL again.

    If that still doesn’t resolve it, I’d suggest posting this in Idea Labs, requesting that Oracle add a date format setting in the filter type for visuals — I’ll definitely vote for it.

    Signing off for now.