Condition not working on Measure column — Oracle Analytics

Oracle Analytics Cloud and Server

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

Condition not working on Measure column

Received Response
1
Views
4
Comments
user12863665
user12863665 Rank 6 - Analytics Lead

i have a measure column.on that column i want to display 'Do not consider' text instead of value if the absolute value is greater than 100. Because of differences in data types its throwing error. anyone suggest how can i display Text 'Do Not Consider' if the absolute value of measure column is greater than 100.

Answers

  • #Mayur
    #Mayur Rank 5 - Community Champion

    Hi,

    Use the case statement in the Measure formula for this requirement.

    eg.

    case when 'measure' >100 then 'Do Not Consider' else

    'measure' end

    Thank You.

  • user12863665
    user12863665 Rank 6 - Analytics Lead

    THis is throwing error saying incompatable data types. Please suggest me work around in answers? Not in rpd

  • choracy69
    choracy69 Rank 6 - Analytics Lead

    Hi,

    This formula is a bit of a misnomer, because if you use CASE WHEN for measure column, it must be the same type of output, and IN THIS case is 'Do Not Consider' and measure column.


    You can use something like that:


    CASE WHEN "Fact"."MeasureColumn" > 100 THEN 'Do Not Consider' ELSE 'OK' END


    You can't use:


    CASE WHEN "Fact"."MeasureColumn" > 100 THEN 'Do Not Consider' ELSE "Fact"."MeasureColumn" END

    But If you want use this formule, you can use CAST function, for example: CAST("Fact"."MeasureColumn" AS VARCHAR(10))


    More information: OBIEE - Case When Statement [Gerardnico]

  • plyskovich
    plyskovich Rank 3 - Community Apprentice

    Use conditional formatting

    Image 1.png