O'Reilly logo

Microsoft SQL Server 2014 Business Intelligence Development: Beginner’s Guide by Reza Rad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required