Oracle Analytics Cloud and Server

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

Filter by case when statement

Received Response
41
Views
8
Comments
BIAP
BIAP Rank 4 - Community Specialist

Hi,

I have a requirement to filter the report by Male, Female and All Gender. Male and Female are two distinct values for the column. In the prompt, we need to enable user to choose Male, Female and All Gender. The Prompt then pass the value to the report to show either male, female or all gender.

Any suggestions or guidance would be great. Thank you.

Answers

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

    Have Gender as an "is prompted" filter in the analysis and then a dashboard prompt with "Gender" on the page as well. Basic functionality.

  • asim cholas
    asim cholas Rank 6 - Analytics Lead

    pastedImage_0.png

  • BIAP
    BIAP Rank 4 - Community Specialist

    Thanks, Sorry I should explain more precisely. We explicitly want Male, Female and All Gender as display value in the prompts. the underlying value for gender column is male, female. How to we deal with All Gender option?

  • BIAP
    BIAP Rank 4 - Community Specialist

    Thanks, Sorry I should explain more precisely. We explicitly want Male, Female and All Gender as display value in the prompts. the underlying value for gender column is male, female. How to we deal with All Gender option?

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

    Obvious question: Why not correct your data? Why not immediately store *M*ale and *F*emale?

    If you don't want to or can't correct your data - why not put that logic into the RPD so that it's actually a coherent logic which gets applied everywhere? I.e. init-cap *M*ale and *F*emale in the logical column.

    As far as "All Gender" goes...you are aware that you're woring with an analytical platform and not some random web application where you change labels based on the colour of socks the business guy put on this morning.

    Your data is your data. If it's rubbish you'll report on rubbish. If you force a fake "All Gender" just to have that displayed visually rather than using the tool as it was designed and as it works you are literally wasting time and effort on something utterly without added value. Plus next time there is a new member in that attribute column - newsflash: male / female binary option is outdated since a Long time - then you will need to hange all logic. And if you insist on doing things in the front-end you will need to change your logic in every single place you've implemented it.

  • asim cholas
    asim cholas Rank 6 - Analytics Lead

    It is always better to have the data at backend.

    However in this situation , you can achieve it by creating two different reports and creating a condition in section of your dashboard page. Let me know if you need any further help.

    in the first report values to be filtered by the prompt values and second report without filter for gender. Create a variable prompt .

  • asim cholas
    asim cholas Rank 6 - Analytics Lead

    pastedImage_0.png

    pastedImage_1.png

    Condition report

    pastedImage_2.png

    pastedImage_3.png

    pastedImage_4.png

  • BIAP
    BIAP Rank 4 - Community Specialist

    Great workaround! Thanks