Oracle Transactional Business Intelligence

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

How do I display Years in drop down list without the decimals?

Accepted answer
86
Views
4
Comments

When I set the default to show as the current year it doesn't show with the decimals (second screenshot), but when I go to select the other values they display with decimals. Any ideas how I can get these to appear without the decimals? I'm using SQL to return values. If I were to predefine the list to show the specific years, they show up fine - without decimals, but then I have to maintain the drop down each year.

Picture 1: Drop downs show with decimals. Budget Year is being defaulted to 2024 and doesn't show decimals.


Is there a formula I can use so it shows in the preferred format or change to the sql to get it to show in the way I want it to? Thank you for any help you can provide.


Best Answer

  • Nathan CCC
    Nathan CCC Rank 7 - Analytics Coach
    Answer ✓

    Hi, This is a column prompt in a dashboard prompt. So you cannot add a number format with zero decimal places as suggested like you can on a column in an analysis. My solution would be to add a function to the "Prompt for column" field using fx to wrap the presentation table/column to cast from a number to a string data type. Remember you will need to do the same in any filter in any analysis if you want this to get added to the where clause of your queries.



Answers

  • Hi @Lisa G,

    Please use that column in the report fields and select the appropriate Number Format for that column, save it and then create the prompt using the column from teh report columns selection.


    Thanks,

    Praveen

  • RichardChan
    RichardChan Rank 6 - Analytics Lead
    edited September 2023

    Why do you want a SQL statement can't you just alter the column format? otherwise use SELECT ROUND(<year>, 0)

  • Lisa G.
    Lisa G. Rank 3 - Community Apprentice

    @Nathan CCC Thank you so much! That did it. I thought I had tried CHAR but it didn't work then I realized I had to invoke that new column field in my SQL too. I so appreciate the help and screen shots.