How to make a conditional calculation — Oracle Analytics

Oracle Analytics Cloud and Server

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

How to make a conditional calculation

Received Response
83
Views
3
Comments

Summary

How to make a conditional calculation

Content

Hi all,

I'm trying to figure out how to make a conditional count.

I have a column where the cells are filled whit "YES" or "NO" and I want to count how many "YES" I have in the whole column.

Thank you in advance for your help.

Answers

  • Juliandelgadillo
    Juliandelgadillo Rank 3 - Community Apprentice

    I have done what you suggest like this:

    image

    However it is not counting only the 'Yes' this calculation is counting all registers.

  • jepva
    jepva Rank 5 - Community Champion

    Create a new column with a CASE WHEN statement.

    Example:

    CASE WHEN column1 = 'Yes' THEN 1 ELSE 0 END

    Then make the default aggregation on that field a sum or count

  • Juliandelgadillo
    Juliandelgadillo Rank 3 - Community Apprentice

    I'm sharing the one that finally worked after a lot of attempts.

    image