Oracle Analytics Cloud and Server

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

how to for date in between

Received Response
11
Views
2
Comments
Rank 1 - Community Starter

hello everyone,

I have a calendar column and was trying to achieve the following. 

can anyone help me as I am having the Formula syntax is invalid. 

case

when "Sale Date (Calendar)" is between ('01-04-2021, 31-03-2020') then "A"

when "Sale Date (Calendar)" is between ('01-04-2020, 31-03-2021') then "B" 

End

Thank you 

Tagged:

Answers

  • Hi,

    The BETWEEN comparison has the following syntax:

    xxx BETWEEN value1 AND value 2
    

    Write your CASE WHEN with this syntax and you should be getting there. If your presentation column is a real date, you should also compare it to dates and not strings.

  • Rank 2 - Community Beginner

    a) Your references to presentation columns are wrong. A correct fully qualified name is "Presentation Table"."Presentation Column".

    b) Date data types are dates. Not strings. Using single quotes denotes a string. '

    c) "A" isn't the string A - 'A' is the string A, see above. Single quotes and double quotes can't be utilized randomly. They have technical and programmatical meaning.

Welcome!

It looks like you're new here. Sign in or register to get started.