Solving the Hard Problems Advanced Power BI Solving the Hard Problems Devin Knight, Training Director, Pragmatic Works
Will work for cupcakes. Popup books about maintaining a healthy relationship with your miniature donkeys. And supporting cult being investigated by the government. Mainly a collection of internet cat picutres. About Devin Training Director Microsoft Data Platform MVP Author of 6 books Runs JSSUG User Group Blogs at DevinKnightSQL.com Twitter: @knight_devin DKnight@pragmaticworks.com
Please silence cell phones
Explore Everything PASS Has to Offer FREE ONLINE WEBINAR EVENTS FREE 1-DAY LOCAL TRAINING EVENTS VOLUNTEERING OPPORTUNITIES LOCAL USER GROUPS AROUND THE WORLD ONLINE SPECIAL INTEREST USER GROUPS PASS COMMUNITY NEWSLETTER FREE ONLINE RESOURCES BUSINESS ANALYTICS TRAINING BA INSIGHTS NEWSLETTER
Agenda Solving Data Import Problems Solving Data Model Problems Solving Data Visualization Problems
What kind of complex data import problems do you have?
Data Import Problems We Will Solve Turning reports into data sources Running the most efficient queries Making queries dynamic
Turning Report into Data Sources Name Position Start Date Salary London $330,350 Tiger Nixon System Architect 4/25/2011 $147,350 Shad Decker Regional Director 11/13/2008 $183,000 New York $881,445 Paul Byrd CFO 6/9/2010 $725,000 Caesar Vance Pre-Sales Support 12/12/2011 $44,445 Donna Snider Customer Support 1/25/2011 $112,000 Name Position Start Date Salary City Tiger Nixon System Architect 4/25/2011 $147,350 London Shad Decker Regional Director 11/13/2008 $183,000 Paul Byrd CFO 6/9/2010 $725,000 New York Caesar Vance Pre-Sales Support 12/12/2011 $44,445 Donna Snider Customer Support 1/25/2011 $112,000
Data Import Problems Demo
Query Folding How Does it Work? Module 3 Query Folding How Does it Work? Query engine pushes work to the data source whenever possible Ideal for the best possible performance Functionality depends on the source system Not all transforms can be folded Does not work if you write your own native database query Read this instead of the slide: The idea behind query folding is pushing all the logic built in an M query back to the server and running it there in it’s native language instead of doing a client side transform of the data. For example, if you have a 2 billion row SQL Server table you need to connect to in Power Query but you want to filter to only show the last years worth of data. With Query Folding the filter of that data is done on the SQL Server side instead of on the client side. If it did do client side queries that would mean all 2 billion rows would be downloaded across the network and then filtered out. This is ideal because it provides the best performance but it only works in certain scenarios. Only works on certain data sources: Most relational data sources: SQL Server, Oracle and Teradata support folding, but so do some of the other sources like OData, Exchange and Active Directory. A text file for example does not have query folding because there is not database engine for the query to be run against Only works on certain transformations: Depends on what the data source supports. Ask yourself does my data source have the ability to do that transform I’m attempting in it’s own query language Only works when you use the UI: Doesn’t work when you write your own query. So unless you plan on pushing all your transform logic into a stored procedure then don’t write your own SQL Unfortunately there is no way of knowing when query folding is taking place while inside of Power Query. You have to use tools like SQL Server Profiler to determine if folding is occurring. Query folding is not all or nothing. You can have partial folding that takes place. The order your transforms are done can make a difference in how much in folded back to the server. For example, a group by transform should appear before a transform like capitalize each word
Query Folding Demo
Parameters and Templates Module 3 Parameters and Templates Parameters Make queries and connections dynamic Should be used for modifying data imported NOT data that is visualized Templates Compartmentalize your Power BI Solution and hand off to others Includes everything but the data
Parameters and Templates Demo
What kind of complex data model problems do you have?
Data Modeling Problems We Will Solve Row Level Security Adding Synonyms to Enhance Q&A
Implementing Row Level Security Module 11 Module 4 Implementing Row Level Security Role Based Security Create a Role Assign Users to the Role Filter Levels Filter all rows Filter individual records Impersonate Roles Use View As Roles option to test out security setup
Row Level Security Demo
Power BI Q&A User Experience Depends on a Well Defined Data Model Module 3 Power BI Q&A User Experience Uses Natural Query Language to return results Depends on a Well Defined Data Model Model relationships Table and column names Choosing default fields Data Category Default Aggregations
Adding Synonyms to Enhance Q&A Module 3 Adding Synonyms to Enhance Q&A Why Synonyms are helpful Users don’t know the names of your tables or columns. Table name T005G in SAP Users don’t call tables by the same name as you
Synonyms Demo
What kind of complex data visualization problems do you have?
Data Visualization Problems We Will Solve Non-measure values in tooltips Power BI Custom Visuals Using R Visuals R Script Showcase
Data Visualization Problems Demo
3 Session Evaluations ways to access Your feedback is important and valuable. Submit by 5pm Friday November 6th to WIN prizes Go to passSummit.com Download the GuideBook App and search: PASS Summit 2016 Follow the QR code link displayed on session signage throughout the conference venue and in the program guide
Thank You Learn more from Devin Knight dknight@pragmaticworks.com or follow @knight_devin