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

Combine values from rows into group

Status
Not open for further replies.

n2nuk

IS-IT--Management
Dec 24, 2002
190
GB
Hi there,

I have a dataset containing the following data

group - client 11111 - Fred Bloggs
Status_start_date status_end_date Status_code
26/01/2016 CAL
07/04/2015 19/09/2015 CAL
24/09/2014 13/01/2015 LSA
01/03/2014 17/06/2014 CAL

group - client 22222 - Wilma Flintstone
Status_start_date status_end_date Status_code
26/01/2016 CAL
17/11/2015 16/01/2016 LSA
19/12/2014 31/03/2015 LSA
17/03/2014 05/06/2014 LSA

group - client 22222 - Wilma Flintstone
Status_start_date status_end_date Status_code
27/03/2016] LSA

roup - client 22222 - Norm
Status_start_date status_end_date Status_code
17/04/2016 27/04/2016 CAL
26/11/2015 16/11/2015 CAL

I would like to suppress the details section but need to return the status description to say either 'CAL', 'LSA' or CAL + LSA'

what would the best way to this?


 
Assuming I understand the data and report structure correctly, this should work:

Code:
If	MAXIMUM({Table.Status_code},{Table.client}) = 'LSA' and
	MINIMUM({Table.Status_code},{Table.client}) = 'CAL'
Then 	'CAL + LSA'
Else	
If 	MAXIMUM({Table.Status_code},{Table.client}) = 'CAL'
Then 	'CAL'
Else 	'LSA'

Hope this helps.

Cheers
Pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top