Oracle Transactional Business Intelligence

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

Something off in SQL expression for criteria

51
Views
2
Comments

Summary

Trying to capture last month's data

Content

The report functions with the expressions below; however, It doesn't seem to actually capture the last day of the previous month. I run the data for May and know there are results for 5/31 but only captures up to 5/29. What is wrong with the expressions. The Beginning of Previous Month expression seems to capture from 5/2 and I have verified that is correct.

Beginning of Previous Month

TIMESTAMPADD(SQL_TSI_MONTH, -1, TIMESTAMPADD(SQL_TSI_DAY, DAYOFMONTH(CURRENT_DATE) * -(1) + 1, CURRENT_DATE))

End of Previous Month

TIMESTAMPADD(SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH(CURRENT_DATE) * -(1) + 1, CURRENT_DATE))

 

Thank you in advance for any assistance!

Cassie Kurth

Tagged:

Comments

  • Rank 5 - Community Champion

    Hi Cassie,

    Using the syntax you have above I'm not seeing any issues running this on an internal env.  I get 5/31/2016 for the End of Previous Month.

    Noelle

    cc_end_of_prev_month.jpg

  • Rank 1 - Community Starter

    Hi Cassandra,

    Did you get any solution for this TIMESTAMPADD functionality ?

    Thanks,

    Murali

Welcome!

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