[null, {"document_url": "https://www.wiseowl.co.uk/reporting-services/exercises/standard/expressions/4244/", "unformatted_src": "/Images/sundry/five-star2.png", "src": "https://www.wiseowl.co.uk/Images/sundry/five-star2.png", "formatted_filename": "five star", "alt_text": "Five star reviews"}, null, {"document_url": "https://www.wiseowl.co.uk/reporting-services/exercises/standard/expressions/4244/", "unformatted_src": "../../../../../files/exercise-images/e4244/i1.jpg", "src": "https://www.wiseowl.co.uk/files/exercise-images/e4244/i1.jpg", "alt_text": "Fields in dataset"}, null, {"document_url": "https://www.wiseowl.co.uk/reporting-services/exercises/standard/expressions/4244/", "unformatted_src": "../../../../../files/exercise-images/e4244/i2.jpg", "src": "https://www.wiseowl.co.uk/files/exercise-images/e4244/i2.jpg", "alt_text": "Basic expression"}, null, {"document_url": "https://www.wiseowl.co.uk/reporting-services/exercises/standard/expressions/4244/", "unformatted_src": "../../../../../files/exercise-images/e4244/i3.jpg", "src": "https://www.wiseowl.co.uk/files/exercise-images/e4244/i3.jpg", "alt_text": "Sorting table"}, null, {"document_url": "https://www.wiseowl.co.uk/reporting-services/exercises/standard/expressions/4244/", "unformatted_src": "../../../../../files/exercise-images/e4244/i4.jpg", "src": "https://www.wiseowl.co.uk/files/exercise-images/e4244/i4.jpg", "alt_text": "Results"}, null, {"document_url": "https://www.wiseowl.co.uk/reporting-services/exercises/standard/expressions/4244/", "unformatted_src": "../../../../../files/exercise-images/e4244/i5.jpg", "src": "https://www.wiseowl.co.uk/files/exercise-images/e4244/i5.jpg", "alt_text": "Switch"}, null, {"document_url": "https://www.wiseowl.co.uk/reporting-services/exercises/standard/expressions/4244/", "unformatted_src": "../../../../../files/exercise-images/e4244/i6.jpg", "src": "https://www.wiseowl.co.uk/files/exercise-images/e4244/i6.jpg", "alt_text": "Final grouped table"}, null]





SSRS Reporting Services | Expressions exercise | Calculate Oscars Success Rate

Create a new report called The Secret Of My Success, add a data source which connects to the Movies database and a dataset which selects these fields: You can select these three fields from the Film table.

Apply a filter to the dataset so that only films with at least 1 Oscar nomination are selected.

Add a field which calculates the Oscar success rate for each film.  You can use this expression: Divide OscarWins by OscarNominations.

Insert a table and assign all four fields to it.  Apply sorting to the table as shown below: Use the Sorting page of the Tablix Properties dialog box to do this.

Format the table and run the report.  See if you can spot anything odd about the results: This type of mistake won't happen when Skynet is in charge.

Add a second calculated field which provides a description based on the success rate.  You can use the Switch function to do this: Feel free to change the category names.

Use your new calculated field to group the table as shown below: You could add totals to the OscarNominations and OscarWins columns.

Save and close the report.
