Time for action – applying ordering and grouping on the data rows

In this example, we will modify the customers' report generated in the previous example. We will add a SalesAmount column for each customer. We will apply sorting on the report and we will add a group for NumberChildrenAtHome. We will also add a subtotal for each group item. Perform the following steps:

  1. In the Customers report, go to the Report Data pane and change the query of DataSet1 to the following script:
    SELECT FirstName, LastName, BirthDate, MaritalStatus, Gender, TotalChildren, NumberChildrenAtHome, EnglishEducation, NumberCarsOwned ,sum(FactInternetSales.SalesAmount) as SalesAmount FROM DimCustomer left outer join FactInternetSales on DimCustomer.CustomerKey=FactInternetSales.CustomerKey ...

Get Microsoft SQL Server 2014 Business Intelligence Development: Beginner’s Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.