×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Custom Month-to-date Filter- VERY IMPORTANT

Custom Month-to-date Filter- VERY IMPORTANT

Custom Month-to-date Filter- VERY IMPORTANT

(OP)
Folks/Gurus,
I would like to develop a custom month-to-date SQL with the following logic:
1- If its regular day of the month, I need a month-to-date (1st of the month to yesterday's) data, eg if its july 26th, data should be from july 1-july 25th.
2- if its 1st of the month, I need last month's month-to-date data. if its july 1, data should be from june 1-june 30th.

If this possible in one statement?

Thanks for your time and help in advance,
Sam

RE: Custom Month-to-date Filter- VERY IMPORTANT

Dear mallu2u

Yes you can get the month-to-date figures. it is very much possible. Please refer to the VMALL model that comes with every MSTR software. In that model they have shown how to create Month-to-date metrics. If you still can't get it, revert back to me.

Thanks.

User14

RE: Custom Month-to-date Filter- VERY IMPORTANT

(OP)
Hi,

Part 1 is easy if doe itself but I would like to combine part 1 and part2 into one filter? do u know how?

RE: Custom Month-to-date Filter- VERY IMPORTANT

Hi,

For the second part you have create a transformational metrics. For that you need to modify your look up table. How to create transformational metric is shown the VMALL project itself. Have a look at and also their data in the warehouse for the transformational metric and month-to-date. We will get some idea. If any more doubt revert back to me.

User14.

RE: Custom Month-to-date Filter- VERY IMPORTANT

Dear mallu2u,
Instead of two transformation object, you could create one single transformation table like this:
Date        MTD
09042002    09032002
09042002    09022002
09042002    09012002
09032002    09022002
09032002    09012002
09022002    09012002
...        ...

This table would satisty the two requirements (1- If its regular day of the month, I need a month-to-date (1st of the month to yesterday's) data, eg if its july 26th, data should be from july 1-july 25th.
2- if its 1st of the month, I need last month's month-to-date data. if its july 1, data should be from june 1-june 30th).

Sincerely,
Humberto Seiji Fukuda
cogubr@hotmail.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close