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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping years into decades

Status
Not open for further replies.

waldopepper

Programmer
Nov 21, 2003
124
GB
I have a Year group that I would love to group into decades so I can drill into each decade then display the years contained within - is this easy to do?
 
Create a formula like :

Left(ToText({Dates.Date},"yyyy"),3)&"0"

Replace the item in bold with your date field, then group by this item.

Hope this helps...

Reebo
UK

Please Note - Due to current economic forcast and budget constraints, the light at the end of the tunnel has been switched off. Thank you for your cooperation.
 
Whoops, sorry :

Create a formula like :

Left(ToText({Dates.Date},"yyyy"),3)&"0"

Replace the item in bold with your date field, then group by this Formula.

Reebo
UK

Please Note - Due to current economic forcast and budget constraints, the light at the end of the tunnel has been switched off. Thank you for your cooperation.
 
Hey thanks - works like a dream.
I have now got the decade displayed as a group header but I can't format the default number display to remove the commas
1,980
1,990
etc - how do you format a group header field? There is no 'Number tab' when I right click and get the format properties up.

??
 
The formula result is text so you should not have any commas.

Are you converting this to a number?

Reebo
UK

Please Note - Due to current economic forcast and budget constraints, the light at the end of the tunnel has been switched off. Thank you for your cooperation.
 
Ah thats the problem - it was outputting as text so I couldn't format it as a number. I have added a ToNumber around the formula and now I can change the number format fine.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top