Powering Up with Power BI Brian Larson Superior Consulting Services, LLC Powering Up with Power BI
Brian Larson 16 years experience with Microsoft Data Visualization Tools Contributed to the initial codebase of SQL Server Reporting Service Regional and National Speaker Author on Business Intelligence and Data Visualization topics for McGraw-Hill Professional
Course Outline Power BI Desktop Power BI Report Server Direct Connect with Power BI Desktop Tabular Data Model Building Basic Visualizations Measures and DAX Expressions Data Import and Transformations Advanced Interactivity Power BI Report Server On-premises Report Viewer Power BI Service Navigation Subscriptions Features Refreshing Data with Gateway Workspaces Administration Content Packs and Apps Power BI Mobile App Features
Power BI Architecture Brian
Power BI Architecture Power BI is… a set of tools from Microsoft designed to provide business users with self-service business intelligence capabilities. Brian
Power BI Architecture Power BI Desktop (pbix file) Tabular Data Storage Visualizations Model Structure Source Data Query Editor Brian
Power BI Architecture Power BI Desktop (pbix file) Tabular Data Storage Model Structure Visualizations Query Editor Source Data Brian
Power BI Architecture Power BI Service Power BI Report Server Deploy Brian Power BI Service Power BI Report Server
Power BI Connection Types Components Stored in… Works with… Data Source Power BI Visualizations Model Structure Data SQL Server Analysis Services DAX/MDX Queries Live Connection Live Connection Visualizations Data Model Structure SQL Server Relational DB, Azure SQL Database, Azure SQL Data Warehouse, SAP HANA T-SQL Queries Direct Query Direct Query Data Visualizations Model Structure All supported Power BI data sources including those listed above. Import Import
Power BI Desktop Brian
Direct Connect with Power BI Desktop Brian Demonstration
Basic Visualizations Brian Demonstration
Data Import and Transformations Brian Demonstration
Tabular Data Model Building User Friendly Models – star schema Relationships –establish and maintain Hierarchies – how to build, start with highest level Demonstration
Measures and DAX Expressions Brian
Default Context in a Measure Default Context is the table Brian
Measures Respond to Filters and Slicers Only Andy Only 2015 Only Guiding Lights Brian Measures respond to the context created by filters and slicers
Measures Respond to Filters and Slicers Sales Tax:=SUM('Orders'[StoreSales]) * 0.07775 2015 Guiding Lights Orders for Andy 2015 Guiding Lights Orders By Product Type By Sales Person Sales Tax $50,652.48 Only 2015 . . . . . . . . . All Orders 2015 Orders 2015 Woodland Creatures Orders for Zeb Brian 2015 Woodland Creatures Orders Filter Sales Tax $490,457.43 Slice Slice Calculate Measure
Aggregate in a Calculate Column Does not react to User Filters Brian Calculated Column becomes an Attribute
Filter Condition in a Measure Large Order Sales:=CALCULATE([Sales in Dollars], Orders[StoreSales]>150) 2015 Guiding Lights Orders for Andy 2015 Guiding Lights Orders > $150 Large Order Sales {None} By Product Type By Sales Person Only 2015 . . . . . . . . . . . . All Orders 2015 Orders 2015 Woodland Creatures Orders for Zeb > $150 Brian 2015 Woodland Creatures Orders Large Order Sales $4,766,105.40 User Filter Measure Filter User Slice User Slice Calculate Measure
Same Attribute in Slicer & Measure Filter Guiding Lights Sales:= CALCULATE([Sales in Dollars], 'Products'[Product Type]="Guiding Lights") 2015 Guiding Lights Orders for Andy 2015 Guiding Lights Orders Guiding Lights 2015 Guiding Lights Sales for Andy $651,478.80 X By Product Type By Sales Person Only 2015 . . . . . . . . . . . . All Orders 2015 Orders 2015 Guiding Lights Sales for Zeb $2,120,164.20 Guiding Lights 2015 Woodland Creatures Orders for Zeb Brian 2015 Woodland Creatures Orders X User Filter Measure Filter User Slice User Slice Calculate Measure
Multiple Attributes Filtered in Measure Guiding Lights 2014 Sales:= CALCULATE([Sales in Dollars], 'Products'[Product Type]="Guiding Lights", 'Time'[Year]=2014) X 2015 Guiding Lights Orders for Andy 2014 Guiding Lights Sales for Andy $703,915.80 Guiding Lights 2015 Guiding Lights Orders X By Product Type By Sales Person Only 2015 . . . . . . . . . . . . All Orders 2015 Orders X 2014 Guiding Lights Sales for Zeb $2,115,498.00 Guiding Lights 2015 Woodland Creatures Orders for Zeb Brian 2015 Woodland Creatures Orders X User Filter Measure Filter User Slice User Slice Calculate Measure
Overriding a User Filter/Slicer with ALL() Guiding Lights All Years Sales:= CALCULATE([Sales in Dollars], 'Products'[Product Type]="Guiding Lights", ALL('Time'[Year])) X Guiding Lights Sales for Andy $2,069,970.00 2015 Guiding Lights Orders for Andy Guiding Lights 2015 Guiding Lights Orders X By Product Type By Sales Person Only 2015 . . . . . . . . . . . . All Orders 2015 Orders X Guiding Lights Sales for Zeb $6,323,343.60 Guiding Lights 2015 Woodland Creatures Orders for Zeb Brian 2015 Woodland Creatures Orders X User Filter Measure Filter User Slice User Slice Calculate Measure
Overriding Filter/Slicer with ALLEXCEPT() All Sales Selected Year:= CALCULATE([Sales in Dollars], ALLEXCEPT('Orders', 'Time'[Year])) 2015 Guiding Lights Orders for Andy Guiding Lights 2015 Sales $161,815,808.92 2015 Guiding Lights Orders X By Product Type By Sales Person Only 2015 X . . . . . . . . . . . . All Orders 2015 Orders Guiding Lights 2015 Sales $161,815,808.92 2015 Woodland Creatures Orders for Zeb Brian 2015 Woodland Creatures Orders X User Filter X Measure Filter User Slice User Slice Calculate Measure
RELATED() Function Orders Product =RELATED(Products[Retail Price]) 2 Unit Price 2 $22.05 5 $15.75 6 $14.70 4 $25.20 Product Code Product Retail Price 2 Boston, MS Harbor Lighthouse $22.05 3 Cape Hatteras, NC Lighthouse $18.90 4 Portland, ME Lighthouse $25.20 5 Split Rock, MN Lighthouse $15.75 6 Manitowoc, WI Lighthouse $14.70 Brian
LOOKUPVALUE() Function =LOOKUPVALUE(Products[Retail Price], [Product Code], [Product]) Orders Product X Product Unit Price 2 $22.05 5 $15.75 6 $14.70 4 $25.20 Product Code Product Retail Price 2 Boston, MS Harbor Lighthouse $22.05 3 Cape Hatteras, NC Lighthouse $18.90 4 Portland, ME Lighthouse $25.20 5 Split Rock, MN Lighthouse $15.75 6 Manitowoc, WI Lighthouse $14.70 Brian Relationship created on the fly
SUMX() Iterative Function Calcd Total Sales:=SUMX('Orders', 'Orders'[Unit Price] * 'Orders'[UnitSales]) 30.80 * 4 = 123.20 Brian 123.20
SUMX() Iterative Function Calcd Total Sales:=SUMX('Orders', 'Orders'[Unit Price] * 'Orders'[UnitSales]) 30.80 * 4 = 123.20 Brian 246.40
SUMX() Iterative Function Calcd Total Sales:=SUMX('Orders', 'Orders'[Unit Price] * 'Orders'[UnitSales]) 30.80 * 4 = 123.20 Brian 369.60
SUMX() Iterative Function Calcd Total Sales:=SUMX('Orders', 'Orders'[Unit Price] * 'Orders'[UnitSales]) 29.40 * 4 = 117.60 Brian 487.20
Using the FILTER() Function Total Sales for Medium Priced Items:=SUMX(FILTER('Orders',Orders[Unit Price] >= 20.00 && Orders[Unit Price] <= 30.00), 'Orders'[Unit Price] * 'Orders'[UnitSales]) 2015 Guiding Lights Orders for Andy Medium Priced Items Total Sales for Medium Priced Items $236,048.40 2015 Guiding Lights Orders By Product Type By Sales Person Only 2015 . . . . . . . . . . . . All Orders 2015 Orders Medium Priced Items Total Sales for Medium Priced Items $657,643.20 2015 Woodland Creatures Orders for Zeb Brian 2015 Woodland Creatures Orders User Filter User Slice User Slice Measure Filter Calculate Measure
Using the FILTER() Function Total Sales for Medium Priced Items:=SUMX(FILTER('Orders',Orders[Unit Price] >= 20.00 && Orders[Unit Price] <= 30.00), 'Orders'[Unit Price] * 'Orders'[UnitSales]) 2015 Guiding Lights Medium Priced Item Orders for Andy 2015 Guiding Lights Orders for Andy SUMX(…) Iterates through the virtual table calculating the sum of the [Unit Price] * [UnitSales] FILTER(…) Filtered Rows Virtual Table New Virtual Table Brian
Using the DATESYTD() Function YTD Sales:=CALCULATE([Sales in Dollars], DATESYTD('Time'[Date])) 2015 Guiding Lights Orders for January Set of Dates YTD Guiding Lights January 2015 YTD Sales $1,212,750.00 2015 Guiding Lights Orders By Product Type By Month of Year Only 2015 . . . . . . . . . . . . All Orders 2015 Orders Set of Dates YTD Woodland Creatures December 2015 YTD Sales $41,577,790.20 2015 Woodland Creatures Orders for December Brian 2015 Woodland Creatures Orders User Filter User Slice User Slice Measure Filter Calculate Measure
Using the DATESYTD() Function YTD Sales:=CALCULATE([Sales in Dollars], DATESYTD('Time'[Date])) 2015 Guiding Lights Orders for January 2015 Guiding Lights Orders for January SUM(…) Sum all Sales in the Virtual Table DATESYTD(…) Filtered Rows Virtual Table New Virtual Table Brian
Using the DATESYTD() Function YTD Sales:=CALCULATE([Sales in Dollars], DATESYTD('Time'[Date])) 2015 Guiding Lights Orders for January - February 2015 Guiding Lights Orders for February SUM(…) Sum all Sales in the Virtual Table DATESYTD(…) Filtered Rows Virtual Table New Virtual Table Brian
Using the DATESYTD() Function YTD Sales:=CALCULATE([Sales in Dollars], DATESYTD('Time'[Date])) 2015 Guiding Lights Orders for January - March 2015 Guiding Lights Orders for March SUM(…) Sum all Sales in the Virtual Table DATESYTD(…) Filtered Rows Virtual Table New Virtual Table Brian
Using the PARALLELPERIOD() Function Prev Qtr Sales:=CALCULATE([Sales in Dollars], PARALLELPERIOD('Time'[Date],-1, QUARTER)) 2015 Guiding Lights Orders for Quarter 1 Set of Dates Prev Quarter Guiding Lights Quarter 1 2015 Prev Qtr Sales $3,534,379.80 2015 Guiding Lights Orders By Product Type By Month of Year Only 2015 . . . . . . . . . . . . All Orders 2015 Orders Dates Prev Quarter Set of Woodland Creatures Quarter 4 2015 Prev Qtr Sales $10,572,865.72 2015 Woodland Creatures Orders for Quarter 4 Brian 2015 Woodland Creatures Orders User Filter User Slice User Slice Measure Filter Calculate Measure
Using the PARALLELPERIOD() Function Prev Qtr Sales:=CALCULATE([Sales in Dollars], PARALLELPERIOD('Time'[Date],-1, QUARTER)) 2014 Guiding Lights Orders for Quarter 4 2015 Guiding Lights Orders for Quarter 1 SUM(…) Sum all Sales in the Virtual Table PARALLELPERIOD(…) Filtered Rows Virtual Table New Virtual Table Brian
Using the PARALLELPERIOD() Function Prev Qtr Sales:=CALCULATE([Sales in Dollars], PARALLELPERIOD('Time'[Date],-1, QUARTER)) 2015 Guiding Lights Orders for Quarter 1 2015 Guiding Lights Orders for Quarter 2 SUM(…) Sum all Sales in the Virtual Table PARALLELPERIOD(…) Filtered Rows Virtual Table New Virtual Table Brian
Using the DATESBETWEEN() Function Curr Qtr Sales:=CALCULATE([Sales in Dollars], DATESBETWEEN('Time'[Date], STARTOFQUARTER('Time'[Date]), ENDOFQUARTER('Time'[Date]))) 2015 Guiding Lights Orders for Quarter 1 2015 Guiding Lights Orders for January SUM(…) Sum all Sales in the Virtual Table DATESBETWEEN(…) Filtered Rows Virtual Table New Virtual Table Brian
Using Variables in a Measure Qtr Over Qtr Sales Growth:= VAR QtrOverQtrDiff = [Curr Qtr Sales] - [Prev Qtr Sales] return IF([Prev Qtr Sales] <> 0, DIVIDE(QtrOverQtrDiff, [Prev Qtr Sales])) Brian
Advanced Interactivity Lily •Power BI service supports viewing and interacting with visuals created with R scripts. Visuals created with R scripts, commonly called R visuals, can present advanced data shaping and analytics such as forecasting, using the rich analytics and visualization power of R. •Demonstrate this feature by having R installed on the presentation laptop or server where data is sourced, install common package ggplot, create 2 visualization showing capability Demonstration
Power BI Report Server
Power BI Report Server A Suite of Products Paginated Reports Mobile Reports KPI’s Power BI Report Server is a solution that customers deploy on their own premises for creating, publishing, and managing reports, then delivering them to the right users in different ways, whether that’s viewing them in web browser, on their mobile device, or as an email in their in-box. A modern web portal you can view in any modern browser. In the web portal, you can organize and display reports and KPIs. You can also store Excel workbooks on the portal. View PBI Desktop reports, paginated reports, and mobile reports within the web portal in your own environment.
Power BI Report Server Demonstration
Power BI Service Lily From the open .pbix, publish to service, select workspace, publish from power bi desktop OR Navigate to PowerBI.com Supported browsers: Microsoft Edge Internet Explorer 11 Chrome desktop latest version Safari Mac latest version Firefox desktop latest version
Power BI Service Features Demonstration
Workspaces Demonstration
Sharing and Receiving Reports and Dashboards Share Dashboard, Create and View Content Packs and Apps Email Subscriptions Demonstration
Data Gateway
Gateway Personal Data Gateway On-premises Data Gateway Personal, prototype use Impersonates you Available with Power BI Pro Computer must be on Computer must have internet connection You have to be logged in or run services as an admin (run as an autonomous service running in the back ground) On-premises Data Gateway For production enterprise use Installed on server, available 24/7 Always on and not asleep Direct internet connection, not wireless Runs as local services The on-premises data gateway acts as a bridge, providing quick and secure data transfer between on-premises data (data that is not in the cloud) and the Power BI, Microsoft Flow, Logic Apps, and PowerApps services.
Data Gateway Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises Service Bus: piece of middleware that allows applications to communicate indirectly Key to enabling hybrid solutions Everything done via outbound requests Different ways to download gateway Power BI.com When logged in, download arrow on navigation bar Dataset ellipses>Datasets>manage gateways>learn more Can only have one gateway on server Requirements .Net 4.5 64 bit windows Windows 7 or higher Windows Server 2008 R2 or higher Recommendations 8 core 8 GB RAM Windows Server 2012 R2 or higher Network Requirements Internet connectivity No inbound ports Outbound ports 443 login/general 5671, 5672 messaging protocol 9350-9354 service bus listeners Install and Configure Identify the account to use with the gateway, service account (O365 login) Gateway name Recovery key: used for disaster or migration Application Gateway Data Source
Data Gateway Power BI Model Gateway Queue Gateway Cloud Service Q/DS/C A model refresh or Direct Query queues up a request with Query/Data Source/Credentials (encrypted) Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises Application Gateway Data Source
The request is analyzed by the Gateway Cloud Service Data Gateway Q/DS/C Power BI Model Gateway Queue Gateway Cloud Service The request is analyzed by the Gateway Cloud Service Azure Service Bus PowerBI.com On-premises Application Gateway Data Source
The Gateway Cloud Service sends the request to the Azure Service Bus Data Gateway Power BI Model Gateway Queue Gateway Cloud Service Q/DS/C The Gateway Cloud Service sends the request to the Azure Service Bus Azure Service Bus PowerBI.com On-premises Application Gateway Data Source
Data Gateway Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus Q/DS/C PowerBI.com On-premises The Application Gateway makes a secure, outbound connection to the Azure Service Bus Application Gateway Data Source
The Application Gateway receives any pending requests Data Gateway Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus Q/DS/C PowerBI.com On-premises The Application Gateway receives any pending requests Application Gateway Data Source
The Application Gateway uses the Data Source to initiate a connection Data Gateway Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises The Application Gateway uses the Data Source to initiate a connection Q/DS/C Application Gateway Data Source
Data Gateway Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises The Application Gateway decrypts the credentials and uses them to complete the connection Q/DS/C Application Gateway Data Source
The query is sent to the data source and executed Data Gateway Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises The query is sent to the data source and executed Q/DS/C Application Gateway Data Source
The result set is returned Data Gateway Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises The result set is returned to the model Results Application Gateway Data Source
Data Gateway with Live Connect Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises Application Gateway Data Source
Data Gateway with Live Connect Q/DS/C/UPN A Live Query queues up a request with Query/Data Source/Credentials (encrypted)/ User Principal Name Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises Application Gateway Data Source
Data Gateway with Live Connect Q/DS/C/UPN Power BI Model Gateway Queue Gateway Cloud Service The request is analyzed by the Gateway Cloud Service Azure Service Bus PowerBI.com On-premises Application Gateway Data Source
Data Gateway with Live Connect Power BI Model Gateway Queue Gateway Cloud Service Q/DS/C/UPN The Gateway Cloud Service sends the request to the Azure Service Bus Azure Service Bus PowerBI.com On-premises Application Gateway Data Source
Data Gateway with Live Connect Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus Q/DS/C/UPN PowerBI.com On-premises The Application Gateway makes a secure, outbound connection to the Azure Service Bus Application Gateway Data Source
Data Gateway with Live Connect Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus Q/DS/C/UPN PowerBI.com On-premises The Application Gateway receives any pending requests Application Gateway Data Source
Data Gateway with Live Connect Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises The Application Gateway uses the Data Source to initiate a connection Q/DS/C/UPN Application Gateway Data Source
Data Gateway with Live Connect Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises The Application Gateway decrypts the credentials and uses them to complete the connection Q/DS/C/UPN Application Gateway Data Source
Data Gateway with Live Connect Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises The User Principal Name is sent as the EffectiveUserName in the connection string Q/DS/C/UPN Application Gateway Data Source
Data Gateway with Live Connect Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises The query is sent to the data source and executed in the security context of the user associated with the UPN Q/DS/C/UPN Application Gateway Data Source
Data Gateway with Live Connect Power BI Model Gateway Queue Gateway Cloud Service Azure Service Bus PowerBI.com On-premises The result set is returned to the model Results Application Gateway Data Source
Data Refresh with On-Premises Data Gateway Demonstration
Power BI Mobile
Supported Devices and Power BI App iOS (iPad, iPhone, iPod Touch, or Apple Watch) Android phone or tablet Windows 10 device Supported Devices Download the Power BI App Google Play Store Apple Store Windows Store Sign into your Power BI account Power BI App Note: Power BI App supports Power BI and SQL Server Reporting Services (2016)
Power BI Mobile Demonstration
Questions
Thank you Brian Larson blarson@teamscs.com