Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Self Joining Relationship


shedproductions

Recommended Posts

I am attempting to create a calculation which

will sum sales by week,month,year. Each Record is a day's worth of info as this is a daily close out record for my store.

Have attempted it using a self-joing relationship

and I'm missing something.

 

The logic is: Sum Sales by Week

Sum Sales by Month

Sum Sales by Year

 

I Understand the SUM. It getting the BY part that's killing me.

 

Any help would be greatly appreciated

Link to comment
Share on other sites

So,

 

you have a single record for each day (with a date field)

 

You could create calculation fields for Month, Year and week number.

 

All calculation fields with a result of number

 

cMonth = Month (YourDateField)

cYear = Year (YourDateField)

Week = WeekOfYear (YourDateField)

 

Now, once you have these, you can create your summary fields and in your layout, create subsummary parts that are by these fields.

 

HTH

Link to comment
Share on other sites

Andy,

What would the sub-summaries parts & fields look

like given your scenerio. I hve tried several to

no avail. I confused.gif Thanks, John

Link to comment
Share on other sites

OK,

 

You have a summary field for the total. Possibly something like Total of Order.

 

When you create a new layout, the layout wizard has an option for columnar list/report.

Choose this and you can create a report based on group data.

 

Add the fields you want to include in the report, then you get to choose how to organize the records. This is where you specify the month/day/ week field. Then you add the summary field. And hey presto. Choose to write a script (This will save the sort order) and voila. Repeat for the Day and week options.

 

You can then write a script to go to the correct report.

 

HTH

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use