Jump to content

This topic is 4782 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hello, first time poster and FM newbie.

I'm creating a DB that tracks sales for a small retail sales team.

One table called "Quarter" contains a primary key called "__kp_Quarter" which is a unique identifier of a fiscal quarter. An example would be "2012 Q1". There are also two fields, startDate and endDate, which the user sets to the start and end dates of the quarter. This is entrusted to the user because lengths of fiscal quarters may vary.

In another table called "Sale," which tracks individual sales, there is a "Date" field. This is also edited by the user, because some sales are backdated. I'd like to have the field _kf_Quarter, where the content is auto-entered by detecting which quarter's date range contains the sale's date.

How is this possible?

Is there a better method to track sales by fiscal quarter?

Posted

You should be able to delete your own post for up to forty eight hours if no one has posted a reply. you can also request a moderator to do this for this for you.

Keep in mind that this is a learning forum, and if you have solved this, you might post your solution for others.

Lee

Posted

I'd like to have the field _kf_Quarter, where the content is auto-entered by detecting which quarter's date range contains the sale's date.

You could do this by a lookup, using a relationship based on:

Sales::Date = Quarter::StartDate

and setting the lookup to 'copy next lower value'.

Is there a better method to track sales by fiscal quarter?

Probably. Why is it that the quarter boundaries cannot be calculated? Are they set arbitrarily by a human?

  • Newbies
Posted

I may have found a solution.

Rather than get hung up on trying to display the current quarter in the Sales layout, I created a multi-criteria relation between the Sale and Quarter tables, in order to filter all sales >= the start date and <= the end date, then added a portal to the Quarter Summary layout.

To put it another way, I chose to look at the situation from a different angle: Not attaching a sale to a label, but creating a report from the sales' related table.

This topic is 4782 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.