should 'sort by age' be the same as 'sort by birth date'?

Discussions about the Leader and Clerk Resources on lds.org.
Post Reply
User avatar
sasgrw
Member
Posts: 280
Joined: Mon Feb 06, 2012 10:47 am
Location: Holly Springs, NC

should 'sort by age' be the same as 'sort by birth date'?

#1

Post by sasgrw »

If you click on the age or birth date column to sort the membership list, you get different results. There are actually two differences:

1. Assuming the membership list is sorted by name at first, if you click on age, it's sorted from youngest to oldest. You can click again to reverse the order. If you had clicked on birth date instead of age (from when it was sorted by name), it would have been sorted from oldest to youngest. Why do the two have opposite default sort orders? It's not a big deal since you can click the column again and sort the other way. It just seems odd that they don't sort the same direction with the first click.

2. Sorting by birth date truly sorts people by age. Sorting by age just groups people currently at the same age and sorts each group alphabetically. For example, if Sis Jones turned 50 yesterday and Bro Smith turns 51 tomorrow, technically they are the same age as of today (50) even though Bro Smith is essentially a year older. When you sort by age, Sis Jones will be listed first because Jones is before Smith in the alphabet even though Bro Smith is really older.

I suppose grouping people by age and sorting each group alphabetically could come in handy, like if you have 20 deacons and want to list all the 13 year olds separately from the 12 year olds so you can split the quorum, but want each list sorted alphabetically.

However, just to add to the confusion, sorting by age doesn't always group by age and sort alphabetically so it isn't consistent. If you sort by birth date *first* and then sort by age, no mater how many times you click on age to reverse the sorting order, it now *always* sorts by true age and doesn't alphabetize the groups. That's just weird.

If you go back and sort by name and then click on age, it's now back to grouping the ages together and sub-sorting by name.

<...light bulb goes off...>

I see the pattern now. Sorting by age, groups people by age and then sub-sorts by whatever column was previously selected. I don't know if that's intentional. I couldn't find anything in the wiki about it. So from the membership list, if I click on sex (as an aside, I'd prefer that column be called gender) and then I click on age, I get people grouped by the same age (as of today) and then sorted by gender.

It's kind of a Shift+Click feature but in reverse order. In Outlook, I can sort my mailbox by date received by clicking on that column. If I then want to see all the mail I got today sorted by sender, I can Shift+Click in the sender column. If I then want to see all the mail I got today by Bro Jones but sorted by size, I can Shift+Click on size. It's now sorting by three columns, in the order I clicked on them.

With the membership list, clicking on age sort of implies a Shift+Click from the previous column but you have to click in the column you want to sub-sort *first* and then click on the age column. If those columns were in Outlook, you'd click on age first then Shift+Click on the sub-sort column, if that makes sense.
User avatar
aebrown
Community Administrator
Posts: 15153
Joined: Tue Nov 27, 2007 8:48 pm
Location: Draper, Utah

#2

Post by aebrown »

sasgrw wrote:If you click on the age or birth date column to sort the membership list, you get different results. There are actually two differences:

It really depends on your perspective. The way I see it, there are no differences at all.
  • When you sort any column of data, it sorts from smallest to largest. Thus an Age column will sort from youngest to oldest. Similarly, a birthdate column will sort from the smallest date to the largest date. That happens to be the opposite of the Age sort, but is consistent in sorting from smallest to largest.
  • A subsequent click on the same column reverses the order to be from largest to smallest.
  • Sorting any column simply sorts the existing data set according to the values in that column. There is no understanding of what that column means (e.g., Age is simply a whole number, completely disconnected from the Birth Date or any other column). Where there are rows with the same value for the current sort key, the previous order of the rows is maintained.
Once you understand these basic principles, you can sort with sub-sorts the way you want. You may need to do things in the reverse order from your initial thinking, but once you are clear on how it works, it is indeed consistent.

Much of this is addressed on the wiki in the Sorting reports section.
Questions that can benefit the larger community should be asked in a public forum, not a private message.
User avatar
sasgrw
Member
Posts: 280
Joined: Mon Feb 06, 2012 10:47 am
Location: Holly Springs, NC

#3

Post by sasgrw »

aebrown wrote:When you sort any column of data, it sorts from smallest to largest.

Gotcha. Makes sense with respect to age and date.
aebrown wrote:A subsequent click on the same column reverses the order to be from largest to smallest.
I didn't have a problem with clicking twice. I knew it reversed the sort.
aebrown wrote:Sorting any column simply sorts the existing data set according to the values in that column...Where there are rows with the same value for the current sort key, the previous order of the rows is maintained.
I kind of get that but it's hard to think that way. The way I sort in excel, outlook, sas, etc is to sort the main column first, then sub-sort the secondary column next.

For example, if I want the membership sorted by gender and then by age within the gender, in I would click on gender then shift+click on age. In excel I would add a custom sort and the first 'sort by' would be gender and 'then by' would be age. In sas I would submit

Code: Select all

proc sort data=foo;
  by gender age;
run;
There are so many tools that work this way that it's hard to think in reverse order when using the membership list. I don't have a problem switching between a standard calculator and my HP postfix calculator but I'm having trouble reversing my thinking on the sorting :-)
Post Reply

Return to “Leader and Clerk Resources”