Highlighted

Combine groups into one group

Explorer ,
Mar 20, 2015

Copy link to clipboard

Copied

I have a report that groups by program code. The values in program code are Undergrad, UndergradTr, UndergradIntl.

I want the Undergrad in one group and all the rest in a different group.

Any thoughts?

Thanks for the reply. My client has decided to go a different way.

TOPICS
Reporting

Views

449

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Combine groups into one group

Explorer ,
Mar 20, 2015

Copy link to clipboard

Copied

I have a report that groups by program code. The values in program code are Undergrad, UndergradTr, UndergradIntl.

I want the Undergrad in one group and all the rest in a different group.

Any thoughts?

Thanks for the reply. My client has decided to go a different way.

TOPICS
Reporting

Views

450

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 20, 2015 0
Advocate ,
Mar 23, 2015

Copy link to clipboard

Copied

As always, I recommend doing the heavy lifting on the database side so that the report gets a simple result set to work with.

In Microsoft's TSQL you can accomplish this as follows:

SELECT programcode, CASE WHEN ((programcode = 'UndergradTr') OR (programcode = 'UndergradIntl')) THEN 'UndergradOther' ELSE programcode END AS GroupingProgramCode

FROM programs

GROUP BY CASE WHEN ((programcode = 'UndergradTr') OR (programcode = 'UndergradIntl')) THEN 'UndergradOther' ELSE programcode END

This will produce a result set with only two groups, as long as program code only has the three values you mentioned.

Note that I include the original program code in case you need to display the actual value somewhere in the report.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 23, 2015 0
Explorer ,
Mar 24, 2015

Copy link to clipboard

Copied

Thanks for the reply. My client has decided to go a different way.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 24, 2015 0
Advocate ,
Mar 24, 2015

Copy link to clipboard

Copied

That's fine, but please close this thread by marking your post as the answer.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 24, 2015 0