+ All Categories
Home > Documents > Power Pivot for Techies

Power Pivot for Techies

Date post: 11-Nov-2014
Category:
Upload: johan-hernan-sanchez-villano
View: 131 times
Download: 13 times
Share this document with a friend
Popular Tags:
92
MAKING BUSINESS INTELLIGENT www.pragmaticworks.c om Power Pivot For Techies Pragmatic Works
Transcript
Page 1: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Power Pivot For TechiesPragmatic Works

Page 2: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Class Logistics

• Dan Clark ([email protected])• Make it Interactive!!!• Mute when not talking to class.• Let me know if sound or video cuts out.• Have Fun – This is cool stuff!!!

Page 3: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Introductions

Page 4: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Agenda - Day 1

• Introduction to PowerPivot• Importing Data• Creating the Data Model• Calculations with DAX• Lab Setup

Page 5: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Agenda - Day 2

• Creating Measures• Time Intelligence• PivotTables• PivotCharts

Page 6: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Agenda - Day 3

• Tabular Data Models in SSAS• Understanding Context with DAX• Advanced Data Analysis• Managing and Securing Tabular Models

Page 7: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 1: Introduction to PowerPivot

• Why use PowerPivot?• Vertipaq Engine• Installing PowerPivot• Exploring Data with PowerPivot

Page 8: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Why use PowerPivot?

• Self Service BI• Fast Performance• Familiar Excel

Interface• Data Analysis

Expressions (DAX) • Integrate Data• Integrate with

SharePoint

Page 9: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

The Vertipaq Engine• Fast Performance• Columnar Database • Data Compression

• In-memory Storage• Calculations on the Fly• Table Model

Page 10: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Installing PowerPivot

• Free Add-in to Excel 2010• 32bit version – supports 2GB files• 64bit version – supports 4GB files• Windows XP SP3 – 32bit only• Windows 7 – 32bit and 64bit versions

Page 11: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Exploring Data with PowerPivot

• Pivot Tables• Fields and Values• Filtering and Slicing• Measures • KPIs• Hierarchies• Pivot Charts

Page 12: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands On Lab: Installing andExploring Data with PowerPivot

http://pragmaticworks.com/PowerPivotForTechies.zip

Page 13: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 2Importing Data into PowerPivot

• Databases• Files• SSAS Cubes• Data Feeds• Refreshing Data

Page 14: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Importing Data from a DatabaseThe Table Import Wizard

• Tables and Views• Previewing• Queries• Stored Procedures

Page 15: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Importing Data from a File

• Importing from Excel– Launches Table Import Wizard– Select Tables (sheets)– Data Preview

• Text File Imports Single Table–No Query option

Page 16: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Importing Data from an SSAS Cube

• SSAS 2005 or greater• MDX Query (Designer Available)• Result is Flattened to Table

Page 17: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Importing Data from a Data Feed

• XML Data Streams • Online Data Source• B to B EDI• Data Feed in Atom Format • Use Table Import Wizard• Provide Web Address

Page 18: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Refreshing Data in PowerPivot

• Data is Point in Time• Manually Refresh Data– Automatic Recalculation Recommended

• Automatic Data Refresh – Published to SharePoint 2010– Scheduled Data Refresh Managed by SharePoint

Page 19: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands On Lab:Loading Data into PowerPivot

Page 20: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 3: Creating the Data Model

• What is a Data Model?• Creating Table Relations• Denormalizing Data• Linked Tables• Creating Hierarchies

Page 21: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

What is a Data Model?

• Tables and Relations• Logical Model vs. Physical Model• Normalization vs. Denormalization• OLAP vs. OLTP• Facts and Dimensions

Page 22: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Creating Table Relations

• Relationship Types– Active and Inactive

• Auto Relationship Detection– Verifying Auto Detection

• Manually Defining Relationships– Data Types– Concatenated Keys

Page 23: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Denormalizing Data

• When to Denormalize• Denormalizing After Loading Data– Using the Related Function

• Denormalizing While Loading Data– Using SQL Queries– Table Joins– Using the Query Designer

Page 24: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Linked Tables

• Table created in Excel• Linked to a Table in PowerPivot• Changes to Linked Tables Automatically

Reflect the Changes in PowerPivot.

Page 25: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hierarchies

• Organize Attributes• Natural Hierarchies

Year Quarter MonthCountry Region City

• Aids in Rolling up/Drilling down Analysis

Page 26: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands On Lab: Updating a Data Model in PowerPivot

Page 27: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 4: Creating Calculations with DAX

• Why DAX?• Calculated Columns• DAX Operators• Working with Text• Date and Time Functions• Conditional and Logical Functions• Miscellaneous Functions

Page 28: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Why DAX?

• Easier Data Analysis • Larger User Base• Leverage Excel– Formula Syntax– PivotTables

• Simpler Relational Data Model– Based on Tables, Columns, and Relationships– No Complex Multidemensional Concepts

Page 29: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Adding Calculated Columns

• Uses DAX Expressions• Populated When Defined• Uses in PivotTable – Row/Column Labels– Filters/Slicers

Data TypesWhole NumberDecimal NumberCurrencyTrue/False TextDate Binary

Page 30: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

DAX Operators

Type Symbol Use

Arithmetic operator + (plus sign) Addition– (minus sign) Subtraction Negation* (asterisk) Multiplication/ (forward slash) Division^ (caret) Exponentiation

Comparison operator = Equal to > Greater than < Less than >= Greater than or equal to <= Less than or equal to <> Not equal to

MarginPercent =[Margin]/[TotalCost]

Page 31: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

DAX Operators (Cont.)

Type Symbol UseText operator & (ampersand) Concatenates two values

Logical operator && (double ampersand) Creates an AND condition between two expressions.

|| (double pipe symbol) Creates an OR condition between two logical expressions.

! (NOT) Returns the complement of the condition defined by the expression that follows.

Parenthesis operator () precedence order and grouping of arguments

LastName=[FirstName] & " " & [LastName]

Page 32: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Working with Text

• Formatting• Concatenating• Casing• Trimming

• Splitting• Searching• Replacing• Converting

CalendarWeekLabel ="Week" & "-" & Right([CalendarWeek],2)

FormatDate=FORMAT('Date'[Datekey],"dddd mmm-dd")

Page 33: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Using Date and Time Functions

• Converting • Current Date and Time• Splitting Apart Dates• Week Number and Week Day• Maturity Dates• Elapsed Time

CalendarMonth =MONTH([Datekey])

Age =Year(NOW()) - Year([BirthDate])

Page 34: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Using Conditional and Logical Functions

• Conditional Calculations• Testing for Multiple Conditions• Testing for Any Condition• Testing for Errors• Testing for Number or Text• Nesting Conditions• Blank Values

StoreSizeArea =IF([SellingAreaSize]>=1000,"Large","Small")

Page 35: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Math Functions

• Ceiling• Log• Round• Random• Trunc

AdjustedPrice=CEILING([ProductPrice],0.05)

Page 36: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Navigation Functions

• Getting a Value From a Related Table• Getting a Set of Values From a Related Table• Filtering Values from a Related Table

ProductCategory=Related('ProductCategory'[ProductCategoryName])

StoreCount=COUNTX(RELATEDTABLE(Store),Store[EntityKey])

Page 37: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands on Lab: Adding Calculated Columns with DAX

Page 38: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 5: Creating Measures with DAX

• Measures• Aggregation• Filter Context• Calculate Function• Miscellaneous Functions

Page 39: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Measures

• Named Formulas • Defined in Measures Grid• Used in Values Area of PivotTable• Evaluated on the Fly• Evaluated Separately for Each Cell

Page 40: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Filter Context• Applied by Filter Constraints• Row and Column Headers• Slicers and Filters• DAX Formula Filters

Page 41: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Aggregation

• Aggregating a column– SUM, AVERAGE, COUNT, DISTINCTCOUNT, MIN,

MAX• Aggregating Expressions Over Rows– SUMX, AVERAGEX, COUNTX, MINX, MAXX

TotalSales:=SUM([SalesAmount])

TotalMargin:=SUMX(Sales,(Sales[SalesAmount]-Sales[TotalCost]))

Page 42: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Using the Calculate Function

• Final Result is a single Value• Expression is Aggregate• SetFilter Modifies Filter Context– Boolean Expression– Table Expression

ResellerSales:=CALCULATE([TotalSales],Store[StoreType]="Reseller")

AllProductSales:=CALCULATE([TotalSales], ALL(Product))

Page 43: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Miscellaneous Functions

• Rank– Ranks Value in List of

Values• TopN

– Returns Aggregate of Top or Bottom Values

SalesTotal =SUM(Sales[SalesAmount])

Bottom10ProductSales =SUMX(TOPN(10, Product, [SalesTotal], 1), [SalesTotal])

ColorRank:=RANKX(ALL(Product[ColorName]), [SalesTotal])

Page 44: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Miscellaneous Functions Cont.

• USERRELATIONSHIP– Allows the Use of a Non-active Relationship– Used in Functions That Have a Filter Argument

• Values– Returns Valid Values for the Column– Based on Current Filter Context– Often Used in IF Function

USERELATIONSHIP(FactSales[ShipDateKey], ‘Date’[DateKey])

VALUES(Geography[RegionCountryName]) = “United States”

Page 45: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands on Lab:Adding Measures with DAX

Page 46: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 6: Incorporating Time Intelligence

• Creating Date Tables• Time Intelligence Functions• Comparing Data over Time• Semi-Additive Measures

Page 47: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Creating Date Tables• One Row for Every Date• Span Range of Possible Dates• Import From Source or Create in

Excel• Mark as a Date Table in Model• Date Column Passed to Time

Intelligence Functions

Page 48: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Time Intelligence Functions• Set of 35 Functions• Handles Both Calendar and Fiscal Years• Functions Returning a Single Date• Previous/Next Functions• To-date• Shifting Date Context

LNBDate:=LASTNONBLANK('Date'[Datekey],[BaseQty])

FIRSTDATE('Date'[Datekey])

DATEADD(Date[DateKey], -1, YEAR))

PREVIOUSMONTH(Date[DateKey])

DATESYTD(Date[DateKey])

Page 49: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Time Intelligence (cont.)

• Evaluate Expressions Over a Period of Time• Evaluate Expressions for a Point in Time

YTDSales:=TOTALYTD([Sales],'Date'[Datekey])

=CLOSINGBALANCEMONTH(SUMX(Inventory,Inventory[UnitCost]*Inventory[UnitsOnHand]),Date[DateKey])

Page 50: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Using Time Intelligence

• Comparing Data over Time– Year-to-Date– Year Over Year Growth– Using a Period Table

• Semi-additive Measures– Aggregated Using SUM Over Some Dimensions– Different Aggregation Over Other Dimensions (Date/Time)– Examples

• Balances • Inventory Levels

Page 51: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands on Lab:Adding Time Intelligence

Page 52: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 7: Working with PivotTables

• Pivot Table Fundamentals• Sorting, Filtering, and Formatting• Adding Calculations• Using Sets • Adding Banding

Page 53: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

PivotTable Fundamentals

• Field List– Values, Labels, Filters, and Slicers– Numeric Fields Default to Values– Text Fields Default to Labels– Hiding Fields and Tables

Page 54: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Sorting, Filtering, and Formatting

• Sorting– Built in Sorting Options– Using Sort Lists

• Filtering– Label Filters– Value Filters– Showing Top Values

• Formatting– Using PivotTable Tools Design Tab– Conditional Formatting

Page 55: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Adding Calculations

• Showing Values as % of Total• Ranking Values• Aggregating Values• Inserting Columns– Convert to Values– Convert to Cube Formulas

=CUBEVALUE("PowerPivot Data",$C7,E$6,Slicer_Year,Slicer_Quarter,Slicer_ResellerSize)

Page 56: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Using Sets and Adding Banding

• Sets– Based on Rows or Columns– Appears in Set Folder After Tables– Use for Custom Sets Not Defined in Data Source

• Banding– Convert Continuous Values into Buckets• Age Ranges, Pricing, Income

– Use a Table Defining Band Ranges– Use Calculate Function to Select Band

Page 57: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands on Lab:Building a PivotTable Report

Page 58: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 8 - Visualizing Data

• PivotTable Visualization• Flattened PivotTable• Working With PivotCharts• Using Multiple Charts and Tables

Page 59: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

PivotTable Visualization

• Data Bars• Sparklines

Page 60: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Flattened PivotTables

• Uses Standard Table Layout• Useful for Reports and Printing

Page 61: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Working with PivotCharts

• Creates a Chart Sheet and a PivotTable Sheet

• PivotTable Provides Data for the Chart

• Popular Chart Types– Column, Pie, Bar, Line

• PivotChart Tools Tabs– Design, Layout, Format, Analyze

• Slicers Control Both Chart and Table

Page 62: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Using Multiple Charts and Tables

• Using Predefined Layouts

• Slicers

• Adding PivotTables and Charts to Existing Layouts

Page 63: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands on Lab: Visualizing the Data

Page 64: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 9: Creating Tabular Data Models in SSAS

• Advantages of using Tabular Data Models• Installing SSAS Tabular Mode• SQL Server Data Tools• Creating Tabular Model Projects• Importing Data• Table Relations

Page 65: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Advantages of using Tabular Data Models in SSAS

• Scalability• Manageability• Security• Development Tools

Page 66: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Installing SSAS Tabular Mode

• Uses Vertipaq Engine• Needs Own Instance of SSAS• Server Mode Must be Tabular• Install SQL Server Data Tools

Page 67: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Creating Tabular Model Projects in SQL Server Data Tools

• Project Templates • Designer Window– Similar to

PowerPivot• Error List• Property Windows• Tool Integration – DAX Editor– Source Control– Deployment Wizard

• Solution Explorer– Container for Project– .bim File Contains Database

Definition, Metadata, Copy and Pasted Data

Page 68: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Importing Data

• Data Sources– Relational Databases– Analysis Service Cubes – Imported as Flattened Data– Excel Files– Power Pivot Workbook - Hosted on SharePoint– Text Files– Data Feeds – Atom Feeds, Reporting Services Reports

• Table Import Wizard– Same as PowerPivot

• Copy and Paste– 10,000 Row Limit– Tables can’t be Partitioned

Page 69: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Table Relations

• Relate Tables Together by Common Column• Composite Keys not Supported– Use a Calculated Column

• Types– One-To-Many– One-To-One

• Table Import Wizard Detects Relationships Defined in Database

Page 70: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Table Relations (Cont.)• Single Active Relationship Between Tables

– Default Used in DAX and Model– Ensures Non-ambiguous dependencies between tables.– Non-Active Relationship Can Exist and be used by DAX– Can Copy Table and Use as Active

• Example - Order Date and Ship Date

• One Relationship for Each Source Column– Source Column Cannot Participate in Multiple Relationships– Can Use Calculated Column to Copy Column

Page 71: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands on Lab: Loading Data into a Tabular Model

Page 72: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 10: DAX Context• Identifying the Row Context• Query and Filter Contexts• Functions that Alter Context• Context and Calculations

Page 73: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Row Context

• Calculated column– Row Context Includes All Values in Current Row

• DAX Function that Iterates Over Rows• SUMX

• Multiple Tables– RELATED Function propagates Row Context

• Must be a Relationship Defined in the Model• Uses Active Relationship by Default• Propagates From the One Side to the Many Side

Discount = SALES[Price] * (1 - RELATED(CustomerDiscount[Discount]))

SalesCount = SUMX(RELATEDTABLE(Sales),Sales[OrderQuantity])

Page 74: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Query and Filter Contexts

• Query Context– Established by the Row and Column Headers– Further Restricted by Filters and Slicers– Different For Each Cell

• Filter Context– Added When a Filter Constraint is Used– Alters the Query Context

SUMX(Filter(Sales,Sales[OrderQuantity]>5),SALES[SalesAmount])

Page 75: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Functions That Alter the Context

• FILTER • DISTINCT• CALCULATE• CALCULATETABLE• ALL• ALLEXCEPT

Page 76: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Functions That Alter the Context• ALLSELECTED

– Removes context filters from columns and rows– Retains all other context filters or explicit filters.

• KEEPFILTERS function– Filters Override any Existing Column Filter

• Hierarchies Filter Context is Cleared• Causes Problems Rolling Up the Data

– KEEPFILTERS Adds Filter Context to Existing Filters

SUMX (KEEPFILTERS (VALUES (Date[CalendarYear])), [TotalSales])

CALCULATE(SUM('ResellerSales'[SalesAmount]), ALLSELECTED())

Page 77: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Context and Calculations

• CALCULATE and RELATEDTABLE convert Row Context to Filter Context

• Set Row Identifier in Table Properties– Avoids Circular Dependencies – Optimizes Calculations– Will Cause Memory Footprint to Increase– Avoid on Large Tables (Fact Table)

• CALCULATE Performs Better Than FILTER and RELATEDTABLE

Page 78: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands On Lab - Exploring Row and Filter Contexts

Page 79: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 11: Advanced Data Analysis

• Creating KPI’s• Parent – Child Relationships• Many to Many Relationships

Page 80: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Creating KPI’s

• Used to Gauge Performance of a Value• Often used on a Business Scorecard• Usually Displayed in Graphical Format– Red, Yellow, Green

• Base Value– Defined by a Measure

• Target Value– Defined by Measure or Absolute Value

• Status Thresholds– Defined by Range Between a low and High Value

Page 81: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Parent – Child Relationships• Table with a Self-referencing Relationship• Designed to Store Relationships

Between Records in the Same Table• DAX Can Materialize Implied Relationships• Used to Create Parent – Child Hierarchy

– Useful for • Organizational Structures• General Ledger Structures

• DAX Functions Exist for Navigating Path

Page 82: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Many to Many Relationship

• Intermediate Table used to Join Tables• Not Supported by Model Designer• Simulated With DAX

Page 83: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Manny To Many Relationships

• Example – Market Basket Analysis– Used to Analyze Customers

Who Purchased Two Sets of Products• Two Copies of the Product Table• Inactive Relationship Defined

Between Sales Table and Product Tables• Filter Customers Who Bought One Set of Products• Check if They Bought a Product From the Other

Set

Page 84: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands on Lab: Creating KPIs and Parent-Child Hierarchies

Page 85: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Module 12: Managing and Securing Tabular Data Models in SSAS

• Implementing Perspectives• Applying Role Based Security• Implementing Row Based Security• Creating and Processing Partitions• Deploying a Tabular Model

Page 86: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Implementing Perspectives

• Define Viewable Subsets of a Model • Provide Business-Specific Viewpoints• Tables, Columns, and Measures are Defined as

Field Objects• Select the Viewable Fields for Each Perspective• Not Meant to be Used for Security• Tool for Providing a Better User Experience

Page 87: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Applying Role Based Security

• Define Member Permissions for a Model• Membership is by Windows Username/Group• Permissions – Read

• Query Data (Based on Row Filters)

– Process • Can Run Processing Operations

– Administrator• Can Make Modifications to the Model Schema • Can Query All Data

Page 88: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Implementing Row Based Security

• Row Filters Define Which Rows Can be Queried

• Row Filters are Defined Using DAX Formulas• Must Evaluate to a TRUE/FALSE Value• Row Filters Apply to the Specified Rows as

Well as Related Rows• Use the Filter, =FALSE(), to Deny Access to All

Rows For a Table

Page 89: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Processing PartitionsOption Description

Add Adds new rows to a partition. Any affected calculated columns, relationships, user hierarchies, or internal engine structures (except table dictionaries) are recalculated.

Clear Drops all the data in a database, table, or partition.

Data Loads data into a partition or table.

Default Loads data into unprocessed partitions or tables. Any affected calculated columns, relationships, user hierarchies, or internal engine structures (except table dictionaries) are recalculated.

Full Loads data into all selected partitions or tables. Any affected calculated columns, relationships, user hierarchies, or internal engine structures (except table dictionaries) are recalculated.

Recalc For all tables in the database, recalculates calculated columns, rebuilds relationships. rebuilds user hierarchies, and rebuilds other internal engine structures.

Page 90: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Deploying a Tabular Model

• Must Deploy to SSAS for Client Access• Connecting to Deployed Model– .bism Connection File in Sharepoint – Data connection directly from reporting client

• Microsoft Excel, Power View, Custom Applications

• Deployment Options– SQL Server Data Tools (SSDT)

• Set Deployment Properties• Server, Database, Cube Name, Processing

– Analysis Management Objects (AMO) Automation– Synchronize Database Wizard

Page 91: Power Pivot for Techies

MAKING BUSINESS INTELLIGENT www.pragmaticworks.com

Hands On Lab: Securing a Tabular Model


Recommended