Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping based an date ranges

Status
Not open for further replies.

SpeedRacer

Programmer
Mar 21, 2001
11
US
I have a formula if {Fish.Date} in Date (2016, 08, 01) to Date (2016, 10, 31) then "1st Quarter" else
if {Fish.Date} in Date (2016, 11, 01) to Date (2017, 01, 31) then "2nd Quarter" else
if {Fish.Date} in Date (2017, 02, 01) to Date (2017, 04, 30) then "3rd Quarter" else
if {Fish.Date} in Date (2017, 05, 01) to Date (2017, 07, 31) then "4th Quarter"
When i group, based on the this formula it doesn't always return the data as expected.
Most of the time i get
1st Quarter data data data
2nd Quarter data data data
3rd Quarter data data data

but sometimes it returns 2nd Quarter data data data
3rd Quarter data data data
1st Quarter data data data

or 2nd Quarter data data data
1st Quarter data data data
3rd Quarter data data data

Any Ideas.
 
That's why - it first groups on Farm and then on Quarter.

I am not exactly sure how you need it, but maybe you can try to combine the groups the way you need by creating a formula like:

@CombinedGroup[tt]
@QuarterGroup &" "& {TABLE.YourFarmField][/tt]

Change QuarterGroup to the name of the formula you have listed in your first post.
Group by @CombinedGroup and delete the other two groups.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top