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:
- 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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.