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!

Partial data matching for grouping

Status
Not open for further replies.

pancho13

Technical User
Apr 22, 2003
12
0
0
AU
I need to group data from a field by partial matching its content... eg: 050512....needs to group by "05*"...or 160523 needs grouping by "16*"....any idea on how to group by this partial match???

Also....how can "alias" this matching statement so that I can display on the report with a text tag like "GROUP 1"..
.....eg: "05*" = "GROUP 1"

Appreciate your help
 
Do you always want to group on the first two digits of the field? I am assuming that the field is a text field. If you create a formula similar to this, left({some_field,2), you should be able to group on the formula.

If the 05 will always GROUP 1, you could create a formula (to display the group) like this If left({some_field,2) = "05" then "GROUP 1" else if left({some_field,2) = "xx" then "GROUP 2" ..., etc.

You can replace the left({some_field,2) in the second formula with the name of the formula used for group (second paragraph).

I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top