SlideShare a Scribd company logo
1 of 27
Using SSRS Reports with SSAS Cubes
Presented By:
Jeff Prom
Senior Consultant
MCTS - Business Intelligence (2008), Admin (2008), Developer (2008)
Magenic Technologies
Agenda
1.   The How & Why of using SSRS with Cubes
2.   Using SSAS as a Data Source
3.   Writing MDX queries
4.   Refactoring SSRS to use SSAS
5.   Demo
6.   Performance Tuning
7.   Questions / Wrap up
Why run reports from a cube?
• Cubes may be readily available
• Cubes may be your company’s primary data source
• Cubes may be your only resource
• ‘Canned’ reports can be created/scheduled/Emailed
• May want to use SSRS instead of Excel
Primary Differences
• Connect to a cube rather than a relational database
• Report queries will use MDX instead of T-SQL
• Report Parameters will use MDX
• Report Field Sources will use XML
• More difficult / time consuming
SSAS
• Online Analytical Processing (OLAP) Cube data structures
• Great for numeric analysis
• Pre-calculated aggregations
• Dimensional Model / Star Schema
• Facts (Measures) & Dimensions
SSAS
• Member
  – An item in a dimension representing one or more occurrences of data.
  – The lowest level of reference when describing cell data in a cube.
• Tuple
  – Used to define a slice of data from a cube.
  – Composed of one or more members.
• Set
  – An ordered collection of zero, one, or more tuples.
MDX Basics
• MultiDimensional Expressions (MDX)
• MDX lets you query multidimensional objects, such as cubes, and return
  multidimensional cellsets.
• Parent/Child hierarchical structure
• Comment your code with:
  –   --
  –   //
  –   /* Code Block */
• Terminate queries with a semicolon ;
• Write/test your MDX queries in Management Studio first!
T-SQL vs MDX Structure
T-SQL
SELECT DISTINCT DATEPART(year, ReservationDate) FROM FactReservationDates;

MDX
SELECT { } ON COLUMNS,
{ NONEMPTY([Reservation Dates].[Calendar Year].Children) } ON ROWS
FROM [HT Cube];




                                                          www.microsoft.com/webcasts
Using MDX in Report Queries
• STRTOSET – Converts a string to a set
• STRTOMEMBER – Converts a string to a member
• Cross Join – Combines tuples of one set with the tuples of another
  – Use * to combine multiple dimensions
• Can’t execute more than one MDX query at a time in SSMS in the same query
  window.
• Beware of the ‘All’ and ‘Unknown’ members.
• If you have multiple conditions in your WHERE clause, you need to enclose them
  in ( )
  – e.g. WHERE (condition1, condition2, condition3);
Double Empty?
• Non Empty vs NonEmpty()
  – Non Empty is a prefix and is used to remove empty record sets
  – NonEmpty() returns the set of tuples that are not empty from a specified set
MDX Filtering
• Filtering in the WHERE clause
• Inline filtering
  – [Customers].[CustomerID].&[123]
  – Use with ON ROWS
• Using ‘Filter’
  – Checks tuples to see if it exists within the filter condition
  – Use with ON ROWS
SSRS
• Data Source: Use Microsoft SQL Server Analysis Services
• Queries need to use MDX instead of T-SQL
• Parameter Values need to use MDX data sources
  – May also need to convert string values into MDX.
• Field sources will be in XML
Report Fields: T-SQL vs MDX (XML)
XML Field Source Values
• Numeric Values
  –   <?xml version="1.0" encoding="utf-8"?><Field xmlns:xsi="http://www.w3.org/2001/XMLSchema-
      instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Measure"
      UniqueName="[Measures].[Total Amount]" />
• Dimension Values
  –   <?xml version="1.0" encoding="utf-8"?><Field xmlns:xsi="http://www.w3.org/2001/XMLSchema-
      instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Level"
      UniqueName="[Customers].[Customer Name].[Customer Name]" />
Calculated Fields
• Use Calculated Fields to pass MDX parameter strings
  – ="[Reservation Dates].[Calendar Year].&["+Fields!CalendarYear.Value+"]"
Passing Parameters Between Reports
• Passing Single Values
  – Easier
  – Two options when passing parameter values:
     1. Pass the parameter name (e.g. @Parameter) and then convert it back into an MDX
        string in the subsequent queries and use a StrToMember function.
Passing Parameters Between Reports
• Passing Single Values
  – Two options when passing parameter values:
     2. Or, create and pass a Calculated Field as an MDX string and then use the
        StrToMember function.
Passing Parameters Between Reports
• > 1 Value
  – Typically More difficult
  – Have to convert to MDX string values
  – In MDX use StrToSet
Demo
Performance Tuning - SSAS
• Ensure the SSAS server has sufficient hardware
• Tune aggregations on your cubes
• Use Partitions
  – By Time
  – By Geography
• Add a Constrained flag to StrToSet and StrToMember functions
  – More secure and improves performance
  –   StrToMember('[Geography].[Geography].[Country].[Germany].FirstChild', CONSTRAINED)
Performance Tuning - MDX
• Performance tune MDX queries
• Use Named Sets to avoid recalculating set expressions
• Use Calculated Members to cache numeric values
• Apply filters to limit the result sets
• Only use StrToSet and StrToMember when using SSRS parameters
• Use the NonEmpty function wherever possible
Performance Tuning - SSRS
• Avoid returning too many records (~ 2,000+)
• Use parameters and filtering to limit records returned
• Try to avoid resource intensive reporting features
  – Fixed Data (Advanced Mode)
  – Repeat on New Page (Advanced Mode)
  – Matrix reports with column groupings
Gotchas
• Constant balancing act between using parameter strings, MDX Values,
  and data set values.
• BIDS2010 – If you put the wrong XML field name values, you will get
  warnings even AFTER you fix it. Need to close BIDS and restart.
• BIDS2008 – Avoid using the query wizard!
  – Can change your queries back to the original
  – The MDX wizard likes to ‘Hide’ your datasets
Pro’s & Con’s
• Pro’s
  – Ability to report off of existing cubes
  – Take advantage of SSAS aggregations
• Con’s
  – Writing queries can be more difficult / time consuming
  – Using parameters can be more complex
  – Not the most efficient for large, detailed reports
Links
• Analysis Services Connection Type for MDX (SSRS)
  – http://msdn.microsoft.com/en-us/library/dd239327.aspx
• Microsoft SSAS Overview
  –   http://msdn.microsoft.com/en-us/library/bb522607.aspx
• Microsoft MDX Overview
  –   http://msdn.microsoft.com/en-us/library/ms145514.aspx
• Microsoft SSRS Overview
  –   http://msdn.microsoft.com/en-us/library/ms159106.aspx
Questions?


Jeff Prom
• Contact Info
  – Blog: http://jeffprom.wordpress.com
  – Email: jeffp@magenic.com
Thank You!



Jeff Prom

More Related Content

What's hot

Building Data Warehouse in SQL Server
Building Data Warehouse in SQL ServerBuilding Data Warehouse in SQL Server
Building Data Warehouse in SQL ServerAntonios Chatzipavlis
 
Data ware house design
Data ware house designData ware house design
Data ware house designSayed Ahmed
 
Database awareness
Database awarenessDatabase awareness
Database awarenesskloia
 
Role of MySQL in Data Analytics, Warehousing
Role of MySQL in Data Analytics, WarehousingRole of MySQL in Data Analytics, Warehousing
Role of MySQL in Data Analytics, WarehousingVenu Anuganti
 
From Raw Data to Analytics with No ETL
From Raw Data to Analytics with No ETLFrom Raw Data to Analytics with No ETL
From Raw Data to Analytics with No ETLCloudera, Inc.
 
Steps To Build A Datawarehouse
Steps To Build A DatawarehouseSteps To Build A Datawarehouse
Steps To Build A DatawarehouseHendra Saputra
 
Data Warehouse Logical Design using Mysql
Data Warehouse Logical Design using MysqlData Warehouse Logical Design using Mysql
Data Warehouse Logical Design using MysqlHAFIZ Islam
 
OLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingOLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingPrithwis Mukerjee
 
SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011Mark Ginnebaugh
 
Star schema my sql
Star schema   my sqlStar schema   my sql
Star schema my sqldeathsubte
 
Lecture 03 - The Data Warehouse and Design
Lecture 03 - The Data Warehouse and Design Lecture 03 - The Data Warehouse and Design
Lecture 03 - The Data Warehouse and Design phanleson
 
The olap tutorial 2012
The olap tutorial 2012The olap tutorial 2012
The olap tutorial 2012Amin Jalali
 
Designing Scalable Data Warehouse Using MySQL
Designing Scalable Data Warehouse Using MySQLDesigning Scalable Data Warehouse Using MySQL
Designing Scalable Data Warehouse Using MySQLVenu Anuganti
 
Hadoop mapreduce and yarn frame work- unit5
Hadoop mapreduce and yarn frame work-  unit5Hadoop mapreduce and yarn frame work-  unit5
Hadoop mapreduce and yarn frame work- unit5RojaT4
 
OLAP & Data Warehouse
OLAP & Data WarehouseOLAP & Data Warehouse
OLAP & Data WarehouseZalpa Rathod
 

What's hot (20)

Building Data Warehouse in SQL Server
Building Data Warehouse in SQL ServerBuilding Data Warehouse in SQL Server
Building Data Warehouse in SQL Server
 
Data ware house design
Data ware house designData ware house design
Data ware house design
 
OLAP
OLAPOLAP
OLAP
 
Database awareness
Database awarenessDatabase awareness
Database awareness
 
Role of MySQL in Data Analytics, Warehousing
Role of MySQL in Data Analytics, WarehousingRole of MySQL in Data Analytics, Warehousing
Role of MySQL in Data Analytics, Warehousing
 
Data Warehouse
Data WarehouseData Warehouse
Data Warehouse
 
From Raw Data to Analytics with No ETL
From Raw Data to Analytics with No ETLFrom Raw Data to Analytics with No ETL
From Raw Data to Analytics with No ETL
 
Steps To Build A Datawarehouse
Steps To Build A DatawarehouseSteps To Build A Datawarehouse
Steps To Build A Datawarehouse
 
Data Warehouse Logical Design using Mysql
Data Warehouse Logical Design using MysqlData Warehouse Logical Design using Mysql
Data Warehouse Logical Design using Mysql
 
OLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingOLAP Cubes in Datawarehousing
OLAP Cubes in Datawarehousing
 
SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011
 
Star schema my sql
Star schema   my sqlStar schema   my sql
Star schema my sql
 
Datawarehouse and OLAP
Datawarehouse and OLAPDatawarehouse and OLAP
Datawarehouse and OLAP
 
Lecture 03 - The Data Warehouse and Design
Lecture 03 - The Data Warehouse and Design Lecture 03 - The Data Warehouse and Design
Lecture 03 - The Data Warehouse and Design
 
The olap tutorial 2012
The olap tutorial 2012The olap tutorial 2012
The olap tutorial 2012
 
Designing Scalable Data Warehouse Using MySQL
Designing Scalable Data Warehouse Using MySQLDesigning Scalable Data Warehouse Using MySQL
Designing Scalable Data Warehouse Using MySQL
 
Oltp vs olap
Oltp vs olapOltp vs olap
Oltp vs olap
 
Hadoop mapreduce and yarn frame work- unit5
Hadoop mapreduce and yarn frame work-  unit5Hadoop mapreduce and yarn frame work-  unit5
Hadoop mapreduce and yarn frame work- unit5
 
OLAP & Data Warehouse
OLAP & Data WarehouseOLAP & Data Warehouse
OLAP & Data Warehouse
 
Hadoop & Data Warehouse
Hadoop & Data Warehouse Hadoop & Data Warehouse
Hadoop & Data Warehouse
 

Similar to Using SSRS Reports with SSAS Cubes

Real-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSASReal-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSASLynn Langit
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStoreMariaDB plc
 
How Clean is your Database? Data Scrubbing for all Skill Sets
How Clean is your Database? Data Scrubbing for all Skill SetsHow Clean is your Database? Data Scrubbing for all Skill Sets
How Clean is your Database? Data Scrubbing for all Skill SetsChad Petrovay
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsPushkar Chivate
 
Introduction To Maxtable
Introduction To MaxtableIntroduction To Maxtable
Introduction To Maxtablemaxtable
 
Cassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingCassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingVassilis Bekiaris
 
Introduction to cassandra
Introduction to cassandraIntroduction to cassandra
Introduction to cassandraNguyen Quang
 
Big Data 2.0 - Milwaukee Big Data User Group Presentation
Big Data 2.0 - Milwaukee Big Data User Group Presentation Big Data 2.0 - Milwaukee Big Data User Group Presentation
Big Data 2.0 - Milwaukee Big Data User Group Presentation NVISIA
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentationOleksii Usyk
 
no sql presentation
no sql presentationno sql presentation
no sql presentationchandanm2
 
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftBest Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftSnapLogic
 
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...Insight Technology, Inc.
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersMichael Rys
 
Appache Cassandra
Appache Cassandra  Appache Cassandra
Appache Cassandra nehabsairam
 
04 2017 emea_roadshowmilan_mariadb columnstore
04 2017 emea_roadshowmilan_mariadb columnstore04 2017 emea_roadshowmilan_mariadb columnstore
04 2017 emea_roadshowmilan_mariadb columnstoremlraviol
 
Data mining by example forecasting and cross prediction using microsoft time ...
Data mining by example forecasting and cross prediction using microsoft time ...Data mining by example forecasting and cross prediction using microsoft time ...
Data mining by example forecasting and cross prediction using microsoft time ...Shaoli Lu
 

Similar to Using SSRS Reports with SSAS Cubes (20)

Real-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSASReal-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSAS
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
 
How Clean is your Database? Data Scrubbing for all Skill Sets
How Clean is your Database? Data Scrubbing for all Skill SetsHow Clean is your Database? Data Scrubbing for all Skill Sets
How Clean is your Database? Data Scrubbing for all Skill Sets
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure tools
 
Introduction To Maxtable
Introduction To MaxtableIntroduction To Maxtable
Introduction To Maxtable
 
Cassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingCassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series Modeling
 
Introduction to cassandra
Introduction to cassandraIntroduction to cassandra
Introduction to cassandra
 
SSAS Tabular model importance and uses
SSAS  Tabular model importance and usesSSAS  Tabular model importance and uses
SSAS Tabular model importance and uses
 
Big Data 2.0 - Milwaukee Big Data User Group Presentation
Big Data 2.0 - Milwaukee Big Data User Group Presentation Big Data 2.0 - Milwaukee Big Data User Group Presentation
Big Data 2.0 - Milwaukee Big Data User Group Presentation
 
Nosql data models
Nosql data modelsNosql data models
Nosql data models
 
SQLDay2013_ChrisWebb_DAXMD
SQLDay2013_ChrisWebb_DAXMDSQLDay2013_ChrisWebb_DAXMD
SQLDay2013_ChrisWebb_DAXMD
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
NoSql Brownbag
NoSql BrownbagNoSql Brownbag
NoSql Brownbag
 
no sql presentation
no sql presentationno sql presentation
no sql presentation
 
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftBest Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
 
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
[db tech showcase Tokyo 2017] C34: Replacing Oracle Database at DBS Bank ~Ora...
 
U-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for DevelopersU-SQL - Azure Data Lake Analytics for Developers
U-SQL - Azure Data Lake Analytics for Developers
 
Appache Cassandra
Appache Cassandra  Appache Cassandra
Appache Cassandra
 
04 2017 emea_roadshowmilan_mariadb columnstore
04 2017 emea_roadshowmilan_mariadb columnstore04 2017 emea_roadshowmilan_mariadb columnstore
04 2017 emea_roadshowmilan_mariadb columnstore
 
Data mining by example forecasting and cross prediction using microsoft time ...
Data mining by example forecasting and cross prediction using microsoft time ...Data mining by example forecasting and cross prediction using microsoft time ...
Data mining by example forecasting and cross prediction using microsoft time ...
 

More from Code Mastery

Query Tuning for Database Pros & Developers
Query Tuning for Database Pros & DevelopersQuery Tuning for Database Pros & Developers
Query Tuning for Database Pros & DevelopersCode Mastery
 
Exploring, Visualizing and Presenting Data with Power View
Exploring, Visualizing and Presenting Data with Power ViewExploring, Visualizing and Presenting Data with Power View
Exploring, Visualizing and Presenting Data with Power ViewCode Mastery
 
Building a SSAS Tabular Model Database
Building a SSAS Tabular Model DatabaseBuilding a SSAS Tabular Model Database
Building a SSAS Tabular Model DatabaseCode Mastery
 
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...Code Mastery
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practicesCode Mastery
 
Keynote Rockford Lhotka on the Microsoft Development Platftorm
Keynote   Rockford Lhotka on the Microsoft Development PlatftormKeynote   Rockford Lhotka on the Microsoft Development Platftorm
Keynote Rockford Lhotka on the Microsoft Development PlatftormCode Mastery
 
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...Code Mastery
 
Session 4 Future of BizTalk and the Cloud
Session 4  Future of BizTalk and the CloudSession 4  Future of BizTalk and the Cloud
Session 4 Future of BizTalk and the CloudCode Mastery
 
Session 3c The SF SaaS Framework
Session 3c  The SF SaaS FrameworkSession 3c  The SF SaaS Framework
Session 3c The SF SaaS FrameworkCode Mastery
 
Session 3b The SF SaaS Framework
Session 3b   The SF SaaS FrameworkSession 3b   The SF SaaS Framework
Session 3b The SF SaaS FrameworkCode Mastery
 
Session 3a The SF SaaS Framework
Session 3a  The SF SaaS FrameworkSession 3a  The SF SaaS Framework
Session 3a The SF SaaS FrameworkCode Mastery
 
Session 2 Integrating SharePoint 2010 and Windows Azure
Session 2   Integrating SharePoint 2010 and Windows AzureSession 2   Integrating SharePoint 2010 and Windows Azure
Session 2 Integrating SharePoint 2010 and Windows AzureCode Mastery
 
Session 1 IaaS, PaaS, SaaS Overview
Session 1   IaaS, PaaS, SaaS OverviewSession 1   IaaS, PaaS, SaaS Overview
Session 1 IaaS, PaaS, SaaS OverviewCode Mastery
 
Loading a data warehouse using ssis 2012
Loading a data warehouse using ssis 2012Loading a data warehouse using ssis 2012
Loading a data warehouse using ssis 2012Code Mastery
 
Exploring, visualizing and presenting data with power view
Exploring, visualizing and presenting data with power viewExploring, visualizing and presenting data with power view
Exploring, visualizing and presenting data with power viewCode Mastery
 
Data Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingData Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingCode Mastery
 
Creating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis ServicesCreating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis ServicesCode Mastery
 
Preparing for Windows 8 and Metro
Preparing for Windows 8 and MetroPreparing for Windows 8 and Metro
Preparing for Windows 8 and MetroCode Mastery
 
Extending Your Reach using the Cloud and Mobile Devices
Extending Your Reach using the Cloud and Mobile DevicesExtending Your Reach using the Cloud and Mobile Devices
Extending Your Reach using the Cloud and Mobile DevicesCode Mastery
 
Creating Tomorrow’s Web Applications Using Today’s Technologies
Creating Tomorrow’s Web Applications Using Today’s Technologies Creating Tomorrow’s Web Applications Using Today’s Technologies
Creating Tomorrow’s Web Applications Using Today’s Technologies Code Mastery
 

More from Code Mastery (20)

Query Tuning for Database Pros & Developers
Query Tuning for Database Pros & DevelopersQuery Tuning for Database Pros & Developers
Query Tuning for Database Pros & Developers
 
Exploring, Visualizing and Presenting Data with Power View
Exploring, Visualizing and Presenting Data with Power ViewExploring, Visualizing and Presenting Data with Power View
Exploring, Visualizing and Presenting Data with Power View
 
Building a SSAS Tabular Model Database
Building a SSAS Tabular Model DatabaseBuilding a SSAS Tabular Model Database
Building a SSAS Tabular Model Database
 
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
 
Keynote Rockford Lhotka on the Microsoft Development Platftorm
Keynote   Rockford Lhotka on the Microsoft Development PlatftormKeynote   Rockford Lhotka on the Microsoft Development Platftorm
Keynote Rockford Lhotka on the Microsoft Development Platftorm
 
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
 
Session 4 Future of BizTalk and the Cloud
Session 4  Future of BizTalk and the CloudSession 4  Future of BizTalk and the Cloud
Session 4 Future of BizTalk and the Cloud
 
Session 3c The SF SaaS Framework
Session 3c  The SF SaaS FrameworkSession 3c  The SF SaaS Framework
Session 3c The SF SaaS Framework
 
Session 3b The SF SaaS Framework
Session 3b   The SF SaaS FrameworkSession 3b   The SF SaaS Framework
Session 3b The SF SaaS Framework
 
Session 3a The SF SaaS Framework
Session 3a  The SF SaaS FrameworkSession 3a  The SF SaaS Framework
Session 3a The SF SaaS Framework
 
Session 2 Integrating SharePoint 2010 and Windows Azure
Session 2   Integrating SharePoint 2010 and Windows AzureSession 2   Integrating SharePoint 2010 and Windows Azure
Session 2 Integrating SharePoint 2010 and Windows Azure
 
Session 1 IaaS, PaaS, SaaS Overview
Session 1   IaaS, PaaS, SaaS OverviewSession 1   IaaS, PaaS, SaaS Overview
Session 1 IaaS, PaaS, SaaS Overview
 
Loading a data warehouse using ssis 2012
Loading a data warehouse using ssis 2012Loading a data warehouse using ssis 2012
Loading a data warehouse using ssis 2012
 
Exploring, visualizing and presenting data with power view
Exploring, visualizing and presenting data with power viewExploring, visualizing and presenting data with power view
Exploring, visualizing and presenting data with power view
 
Data Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingData Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional Modeling
 
Creating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis ServicesCreating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis Services
 
Preparing for Windows 8 and Metro
Preparing for Windows 8 and MetroPreparing for Windows 8 and Metro
Preparing for Windows 8 and Metro
 
Extending Your Reach using the Cloud and Mobile Devices
Extending Your Reach using the Cloud and Mobile DevicesExtending Your Reach using the Cloud and Mobile Devices
Extending Your Reach using the Cloud and Mobile Devices
 
Creating Tomorrow’s Web Applications Using Today’s Technologies
Creating Tomorrow’s Web Applications Using Today’s Technologies Creating Tomorrow’s Web Applications Using Today’s Technologies
Creating Tomorrow’s Web Applications Using Today’s Technologies
 

Recently uploaded

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 

Recently uploaded (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 

Using SSRS Reports with SSAS Cubes

  • 1. Using SSRS Reports with SSAS Cubes Presented By: Jeff Prom Senior Consultant MCTS - Business Intelligence (2008), Admin (2008), Developer (2008) Magenic Technologies
  • 2. Agenda 1. The How & Why of using SSRS with Cubes 2. Using SSAS as a Data Source 3. Writing MDX queries 4. Refactoring SSRS to use SSAS 5. Demo 6. Performance Tuning 7. Questions / Wrap up
  • 3. Why run reports from a cube? • Cubes may be readily available • Cubes may be your company’s primary data source • Cubes may be your only resource • ‘Canned’ reports can be created/scheduled/Emailed • May want to use SSRS instead of Excel
  • 4. Primary Differences • Connect to a cube rather than a relational database • Report queries will use MDX instead of T-SQL • Report Parameters will use MDX • Report Field Sources will use XML • More difficult / time consuming
  • 5. SSAS • Online Analytical Processing (OLAP) Cube data structures • Great for numeric analysis • Pre-calculated aggregations • Dimensional Model / Star Schema • Facts (Measures) & Dimensions
  • 6. SSAS • Member – An item in a dimension representing one or more occurrences of data. – The lowest level of reference when describing cell data in a cube. • Tuple – Used to define a slice of data from a cube. – Composed of one or more members. • Set – An ordered collection of zero, one, or more tuples.
  • 7. MDX Basics • MultiDimensional Expressions (MDX) • MDX lets you query multidimensional objects, such as cubes, and return multidimensional cellsets. • Parent/Child hierarchical structure • Comment your code with: – -- – // – /* Code Block */ • Terminate queries with a semicolon ; • Write/test your MDX queries in Management Studio first!
  • 8. T-SQL vs MDX Structure T-SQL SELECT DISTINCT DATEPART(year, ReservationDate) FROM FactReservationDates; MDX SELECT { } ON COLUMNS, { NONEMPTY([Reservation Dates].[Calendar Year].Children) } ON ROWS FROM [HT Cube]; www.microsoft.com/webcasts
  • 9. Using MDX in Report Queries • STRTOSET – Converts a string to a set • STRTOMEMBER – Converts a string to a member • Cross Join – Combines tuples of one set with the tuples of another – Use * to combine multiple dimensions • Can’t execute more than one MDX query at a time in SSMS in the same query window. • Beware of the ‘All’ and ‘Unknown’ members. • If you have multiple conditions in your WHERE clause, you need to enclose them in ( ) – e.g. WHERE (condition1, condition2, condition3);
  • 10. Double Empty? • Non Empty vs NonEmpty() – Non Empty is a prefix and is used to remove empty record sets – NonEmpty() returns the set of tuples that are not empty from a specified set
  • 11. MDX Filtering • Filtering in the WHERE clause • Inline filtering – [Customers].[CustomerID].&[123] – Use with ON ROWS • Using ‘Filter’ – Checks tuples to see if it exists within the filter condition – Use with ON ROWS
  • 12. SSRS • Data Source: Use Microsoft SQL Server Analysis Services • Queries need to use MDX instead of T-SQL • Parameter Values need to use MDX data sources – May also need to convert string values into MDX. • Field sources will be in XML
  • 13. Report Fields: T-SQL vs MDX (XML)
  • 14. XML Field Source Values • Numeric Values – <?xml version="1.0" encoding="utf-8"?><Field xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Measure" UniqueName="[Measures].[Total Amount]" /> • Dimension Values – <?xml version="1.0" encoding="utf-8"?><Field xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Level" UniqueName="[Customers].[Customer Name].[Customer Name]" />
  • 15. Calculated Fields • Use Calculated Fields to pass MDX parameter strings – ="[Reservation Dates].[Calendar Year].&["+Fields!CalendarYear.Value+"]"
  • 16. Passing Parameters Between Reports • Passing Single Values – Easier – Two options when passing parameter values: 1. Pass the parameter name (e.g. @Parameter) and then convert it back into an MDX string in the subsequent queries and use a StrToMember function.
  • 17. Passing Parameters Between Reports • Passing Single Values – Two options when passing parameter values: 2. Or, create and pass a Calculated Field as an MDX string and then use the StrToMember function.
  • 18. Passing Parameters Between Reports • > 1 Value – Typically More difficult – Have to convert to MDX string values – In MDX use StrToSet
  • 19. Demo
  • 20. Performance Tuning - SSAS • Ensure the SSAS server has sufficient hardware • Tune aggregations on your cubes • Use Partitions – By Time – By Geography • Add a Constrained flag to StrToSet and StrToMember functions – More secure and improves performance – StrToMember('[Geography].[Geography].[Country].[Germany].FirstChild', CONSTRAINED)
  • 21. Performance Tuning - MDX • Performance tune MDX queries • Use Named Sets to avoid recalculating set expressions • Use Calculated Members to cache numeric values • Apply filters to limit the result sets • Only use StrToSet and StrToMember when using SSRS parameters • Use the NonEmpty function wherever possible
  • 22. Performance Tuning - SSRS • Avoid returning too many records (~ 2,000+) • Use parameters and filtering to limit records returned • Try to avoid resource intensive reporting features – Fixed Data (Advanced Mode) – Repeat on New Page (Advanced Mode) – Matrix reports with column groupings
  • 23. Gotchas • Constant balancing act between using parameter strings, MDX Values, and data set values. • BIDS2010 – If you put the wrong XML field name values, you will get warnings even AFTER you fix it. Need to close BIDS and restart. • BIDS2008 – Avoid using the query wizard! – Can change your queries back to the original – The MDX wizard likes to ‘Hide’ your datasets
  • 24. Pro’s & Con’s • Pro’s – Ability to report off of existing cubes – Take advantage of SSAS aggregations • Con’s – Writing queries can be more difficult / time consuming – Using parameters can be more complex – Not the most efficient for large, detailed reports
  • 25. Links • Analysis Services Connection Type for MDX (SSRS) – http://msdn.microsoft.com/en-us/library/dd239327.aspx • Microsoft SSAS Overview – http://msdn.microsoft.com/en-us/library/bb522607.aspx • Microsoft MDX Overview – http://msdn.microsoft.com/en-us/library/ms145514.aspx • Microsoft SSRS Overview – http://msdn.microsoft.com/en-us/library/ms159106.aspx
  • 26. Questions? Jeff Prom • Contact Info – Blog: http://jeffprom.wordpress.com – Email: jeffp@magenic.com

Editor's Notes

  1. A dimension is the descriptive attribute of a measure.
  2. Quadruple, quintuple
  3. Calculated members = With member… x + y
  4. If you do just ‘where condition1, condition1’ it will give an error on the comma
  5. http://beyondrelational.com/modules/2/blogs/65/posts/11569/mdx-non-empty-vs-nonempty.aspxNon Empty - only the rows having NULL for all the members of the set defined in the column axis is filtered out.NonEmpty - returns the set of tuples that are not empty from a specified set. Basically what’s in the () part is what get’s evaluated. It will then only show records that have a value.Non Empty – If the whole fact table doesn’t have a value, it is truly NULL. Then it get’s filtered out.NonEmpty – On the query result set, if there are no results, then it should get removed.
  6. @ReservationNumber is not using the MDXString, just the value.
  7. @ParkName is actually using the MDXString value.
  8. When the CONSTRAINED flag is used, the member name must be directly resolvable to a qualified or unqualified member name. This flag is used to reduce the risk of injection attacks via the specified string. If a string is provided that is not directly resolvable to a qualified or unqualified member name, the following error appears: &quot;The restrictions imposed by the CONSTRAINED flag in the STRTOMEMBER function were violated.&quot; When the CONSTRAINED flag is not used, the specified member can resolve either directly to a member name or can resolve to an MDX expression that resolves to a name.