# SSIS Integration Services | Conditional split transforms exercise | Show a summary of Brexit voting figures by status

This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.

 Software ==> SSIS Integration Services  (46 exercises) Version ==> SSIS 2012 and later Topic ==> Conditional split transforms  (5 exercises) Level ==> Harder than average Subject ==> SSIS training
Before you can do this exercise, you'll need to download and unzip this file (if you have any problems doing this, click here for help).

You need a minimum screen resolution of about 700 pixels width to see our exercises. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

The aim of this exercise is to produce a text file showing the Brexit voting figures, with the largest differences between leave and remain votes coming first:

Dudley (shown highlighted) was the leave area with the highest absolute difference in votes between leave and remain, but it was only 6th in order of absolute difference in votes cast.

To do this, you'll need to derive the Status column shown above, and also calculate the absolute difference and sort by this.

If you're feeling brave, you could continue without turning the page for help!

Here's what the final package could look like:

A suggestion for how to solve this problem - a guide to each step follows.

Here's what each step could do:

Step What it could do
1 Import the Excel workbook contained in the folder at the top of this exercise.
2 A conditional split to determine if the leave votes exceeded the remain ones.
3 A derived column transform to create a new field called Status, and set it to Leave.
4 A derived column transform to create a new field called Status, and set it to Remain.
5 A Union All transform to unite leavers and remainers (if only it were that simple).
6 Use the ABS function in a derived column transform to work out the difference between leave and remain votes, ignoring any sign.
7 Sort by this newly calculated column.
8 Send the output to a new flat file.

When everything's working, close down the package and (if a remainer) shed a little tear.

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.