SSRS Reporting Services | Revision of expressions exercise | Creating basic expressions

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 ==> SSRS Reporting Services  (99 exercises)
Version ==> SSRS 2012 and later
Topic ==> Revision of expressions  (3 exercises)
Level ==> Relatively easy
Subject ==> SSRS 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 report is to create a matrix, showing how many actors there are for each season and month of birth:

Matrix giving results

The "season" is fairly loosely defined. This shows that more actors are born in the winter (hardly surprising, since by our definition Winter lasts twice as long as Summer).


To do this, first create a report called Thespian Theasons, to include a dataset based on the tblActor table of actors. 

Now add two calculated fields to your dataset as follows:

Two new dataset fields

The two new fields we'll create, as explained below.


The two new fields should use expressions as follows:

Field Expression
BirthMonth Use the Month function to find the month corresponding to the actor's date of birth.
BirthSeason Use an IIF function to work out the season in which this month occurred: if the month is after 4 and before 9, we'll call it Summer; otherwise, we'll say this is Winter (at the time of writing this exercise, in early July, it's hard to distinguish between the two).

Use these fields to build a matrix as shown at the start of this exercise:

Matrix in design view

The matrix you create doesn't have to look as neat as the one shown at the start of this exercise.


Close down your report, saving any changes.

You can unzip this file to see the answers to this exercise, although please remember this is for your personal use only.
This page has 0 threads Add post