Topic
  • 2 replies
  • Latest Post - ‏2013-10-18T13:25:54Z by brunoro
brunoro
brunoro
29 Posts

Pinned topic How I can get just last 2 years in FrameworkM?

‏2013-10-17T21:43:24Z |

Hi,

 

I am building an packge that will be used to create an power cube. But my client just need that last 2 years from current date.

I use it as filter or inside query subject?

How I can set the function??

 

 

Thanks.

  • OpherB
    OpherB
    664 Posts

    Re: How I can get just last 2 years in FrameworkM?

    ‏2013-10-17T22:02:54Z  

    Yes, the best way to do this is to filter the query subject in FM. You may want to keep another version of the query subject without the filter for testing purposes.

    Your exact filter expression will depend on the database source of data. For example, in Oracle you can do something like

    trunc({sysdate}, 'YYYY')

    and that will return the first day of the current year. Subtract two years and you're done.

    Does the client/user want the current year in progress? If so, in addition to two full years, or just a rolling 24 months?

    These questions will impact the results they get.

    Good luck,
    Opher

     

     

  • brunoro
    brunoro
    29 Posts

    Re: How I can get just last 2 years in FrameworkM?

    ‏2013-10-18T13:25:54Z  
    • OpherB
    • ‏2013-10-17T22:02:54Z

    Yes, the best way to do this is to filter the query subject in FM. You may want to keep another version of the query subject without the filter for testing purposes.

    Your exact filter expression will depend on the database source of data. For example, in Oracle you can do something like

    trunc({sysdate}, 'YYYY')

    and that will return the first day of the current year. Subtract two years and you're done.

    Does the client/user want the current year in progress? If so, in addition to two full years, or just a rolling 24 months?

    These questions will impact the results they get.

    Good luck,
    Opher

     

     

    Hello,

     

    Thanks for reply.

    I wll try this!