<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Key2 Consulting Blogs &#187; Matt Wollner</title>
	<atom:link href="http://key2consulting.com/Blogs/author/matt-wollner/feed/" rel="self" type="application/rss+xml" />
	<link>http://key2consulting.com/Blogs</link>
	<description>BI, Data Warehousing, SharePoint and .NET</description>
	<lastBuildDate>Mon, 30 Apr 2012 17:47:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Add SSD to Dell Precision</title>
		<link>http://key2consulting.com/Blogs/2012/03/06/add-ssd-to-dell-precision/</link>
		<comments>http://key2consulting.com/Blogs/2012/03/06/add-ssd-to-dell-precision/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 21:42:35 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Dell Precision]]></category>
		<category><![CDATA[Hard Drive]]></category>
		<category><![CDATA[mSATA]]></category>
		<category><![CDATA[Precision M4600]]></category>
		<category><![CDATA[Solid State Disk]]></category>
		<category><![CDATA[SSD]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=439</guid>
		<description><![CDATA[I just received a new Dell Precision M4600 from work. I wanted to install Windows on a SSD so that it would fly. I know that if you are configuring the m4600 on the Dell website, you are given the option to add a 2nd 128GB (SATA3) Mobility Solid State Drive for just $480.00. Since [...]]]></description>
			<content:encoded><![CDATA[<p>I just received a new <a href="http://configure.us.dell.com/dellstore/config.aspx?oc=bwct74b-ptg&amp;c=us&amp;l=en&amp;s=biz&amp;cs=555&amp;model_id=precision-m4600">Dell Precision M4600</a> from work.  I wanted to install Windows on a <a href="http://en.wikipedia.org/wiki/Solid-state_drive">SSD </a>so that it would fly.  I know that if you are configuring the m4600 on the Dell website, you are given the option to add a 2nd 128GB (SATA3) Mobility Solid State Drive for just $480.00.</p>
<p>Since my laptop was ordered for me, I did not have the option to add this on, and $500 is a bit much when you can purchase a 128GB SSD for $100-$200.  I called Dell to find out what my options were.  After several calls and live chats, I was told that there were 0 options to add on a new SSD disk.</p>
<p>I did a little digging on my on and found 2 options.</p>
<ol>
<li>Replace the DVD drive with a <a href="http://www.buy.com/pr/product.aspx?sku=221158659&amp;sellerid=26076229">HD Caddy</a> and install a 2.5&#8243; SSD.  The main problem with this approach is that you will loose your internal DVD drive.</li>
<li>Install a mSATA SSD.  This can be installed in the WWAN slot.  I don&#8217;t have a <a href="http://en.wikipedia.org/wiki/Wireless_WAN">WWAN </a>card so that makes this an easy decision.</li>
</ol>
<p>I purchased a Kingston 64 GB mSATA SSD for $89 on <a href="http://www.amazon.com/Kingston-SSDNow-Internal-SMS100S2-64G/dp/B0062CHMZG/ref=sr_1_9?ie=UTF8&amp;qid=1329251153&amp;sr=8-9">Amazon</a>.  Here are the very simple steps to install the mSATA card</p>
<ol>
<li>Remove Battery</li>
<li>Remove the Base Cover</li>
<li>Install mSATA card in the WWAN slot.  You will also need 1 tiny screw.  I don&#8217;t know the size or name.  I just hapended to have one.
<p>Dell has some really good step by step instructions to installing components.<br />
Dell&#8217;s Precision M4600 Owner&#8217;s Manual -<a href="http://support.dell.com/support/edocs/systems/wsM4600/en/SM/index.html"> http://support.dell.com/support/edocs/systems/wsM4600/en/SM/index.html</a></li>
</ol>
<p><a href="http://key2consulting.com/Blogs/wp-content/uploads/2012/03/20120306_145038.jpg"><img class="alignnone size-medium wp-image-440" src="http://key2consulting.com/Blogs/wp-content/uploads/2012/03/20120306_145038-300x225.jpg" alt="" width="300" height="225" /></a> <a href="http://key2consulting.com/Blogs/wp-content/uploads/2012/03/20120306_145027.jpg"><img class="alignnone size-medium wp-image-441" src="http://key2consulting.com/Blogs/wp-content/uploads/2012/03/20120306_145027-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://key2consulting.com/Blogs/wp-content/uploads/2012/03/20120306_144911.jpg"><img class="alignnone size-medium wp-image-442" src="http://key2consulting.com/Blogs/wp-content/uploads/2012/03/20120306_144911-300x209.jpg" alt="" width="300" height="209" /></a></p>
<p>After putting the cover and battery back in I turned on my PC and Windows instantly recognized the drive.  I went into my Disk management and formatted the drive.  Being a SSD it took about 15 seconds.  Then I installed window to the new drive.</p>
<p>When installing Windows you want to make sure that all you user files and program files get installed to your main hard drive and not your SSD. Make sure that you run RegEdit and edit the following before installing any other programs or creating any users</p>
<ul>
<li><a href="http://www.intowindows.com/change-default-installation-directory-in-windows-7-vista/">Move the Default path for Program Files (and ProgramFilesDir (x86) on a 64bit machine</a>. Edit the following registry settings for the ProgramFilesDir and ProgramFilesDir (x86) to point to you main hard drive:
<ul>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
<ul>
<li>ProgramFilesDir</li>
<li>ProgramFilesDir (x86)</li>
</ul>
</li>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion
<ul>
<li>ProgramFilesDir</li>
<li>ProgramFilesDir (x86)</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://www.windows7hacker.com/index.php/2009/05/how-to-change-user-profile-default-location-in-windows-7/">Move the Default user files to you main disk</a>
<ul>
<li>HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion\ProfileList
<ul type="circle">
<li>Default</li>
<li>Public</li>
<li>Profile Directory</li>
</ul>
</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2012/03/06/add-ssd-to-dell-precision/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL 2012 RC0</title>
		<link>http://key2consulting.com/Blogs/2011/11/22/sql-2012-rc0/</link>
		<comments>http://key2consulting.com/Blogs/2011/11/22/sql-2012-rc0/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 16:14:39 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Power Pivot]]></category>
		<category><![CDATA[SQL 2012]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=423</guid>
		<description><![CDATA[Microsoft has release SQL Server 2012 RC0. http://www.microsoft.com/download/en/details.aspx?id=28145 You can also get the RC0 release of PowerPivot for Excel 2010. http://www.microsoft.com/download/en/details.aspx?id=28150]]></description>
			<content:encoded><![CDATA[<p>Microsoft has release SQL Server 2012 RC0.<br />
<a href="http://www.microsoft.com/download/en/details.aspx?id=28145">http://www.microsoft.com/download/en/details.aspx?id=28145</a></p>
<p>You can also get the RC0 release of PowerPivot for Excel 2010.<br />
<a href="http://www.microsoft.com/download/en/details.aspx?id=28150">http://www.microsoft.com/download/en/details.aspx?id=28150</a></p>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2011/11/22/sql-2012-rc0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Table Size History</title>
		<link>http://key2consulting.com/Blogs/2011/09/14/table-size-history/</link>
		<comments>http://key2consulting.com/Blogs/2011/09/14/table-size-history/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 21:32:51 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Dimesion]]></category>
		<category><![CDATA[Disk Usage]]></category>
		<category><![CDATA[Fact]]></category>
		<category><![CDATA[sp_spaceused]]></category>
		<category><![CDATA[SQL 2008]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[SSRS]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Table]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=403</guid>
		<description><![CDATA[When maintaining a data warehouse, it is import understand the size and disk requirements of your tables over time. My current client has asked that I generate a report showing table disk usage over time, so that we can predict table growth. I was looking around and found the procedure sp_spaceused. This returns the row [...]]]></description>
			<content:encoded><![CDATA[<p>When maintaining a data warehouse, it is import understand the size and disk requirements of your tables over time.  My current client has asked that I generate a report showing table disk usage over time, so that we can predict table growth.</p>
<p>I was looking around and found the procedure <a href="http://msdn.microsoft.com/en-us/library/ms188776.aspx">sp_spaceused</a>.  This returns the row count, data usage and index usage for a given table.  I decided to create a fact table to save the table info on a daily basis.  The SSIS package should not be too difficult to create but it turned out to be a much bigger challenge then I expected.  </p>
<p>First I created a Fact Table and couple of Dimension Tables.  I took my standard Dim.Date and Created a Dim.TableDefinition to store the table name and other table related info.   I used <a href="http://msdn.microsoft.com/en-us/library/ms187406.aspx">sys.tables</a> to get the base info.  </p>
<pre>
CREATE TABLE Fact.TableSize(
	TableSizeKey int IDENTITY(1,1) NOT NULL,
	RunDateKey int NULL,
	LastInsertDateKey int NULL,
	TableDefinitionKey int NULL,
	TableRows bigint NULL,
	ReservedSpace bigint NULL,
	DataSpace bigint NULL,
	IndexSpace bigint NULL)

CREATE TABLE Dim.TableDefinition(
	TableDefinitionKey int IDENTITY(1,1) NOT NULL,
	SchemaName varchar(50) NOT NULL,
	TableName varchar(50) NOT NULL,
	TableSchemaName varchar(100) NOT NULL,
	TableDescription varchar(max) NULL)

--Populate Dim.TableDefinition
SELECT
	S.name + '.' + T.name  AS TableSchemaName
	,S.name AS SchemaName
	,T.name  AS TableName
	,NULL AS TableDescription
FROM sys.tables T
INNER JOIN sys.schemas S ON T.schema_id = S.schema_id
WHERE LEFT(T.name, 3) IN ('dim','fac')
</pre>
<p>To create the SSIS package I started off in the Data flow.  I first created an OLE DB Source, with the SQL command </p>
<pre> sp_spaceused 'dbo.Table1' </pre>
<p>and clicked on the Columns tab.  I was sad to see that the Editor only pulled back the default set of columns that the procedure returns, when no parameters are passed in.  </p>
<p>To get the proper output I stubbed out a select statement before calling the procedure.</p>
<pre>
IF 1 = 2 BEGIN
	DECLARE @SchemaStub TABLE
		(TableName VARCHAR(50)
		,TableRows VARCHAR(50)
		,ReservedSpace VARCHAR(50)
		,DataSpace VARCHAR(50)
		,IndexSpace VARCHAR(50)
		,UnusedSpace VARCHAR(50))

	SELECT  TableName
		,TableRows
		,ReservedSpace
		,DataSpace
		,IndexSpace
		,UnusedSpace
	FROM @SchemaStub
END

EXEC sp_spaceused 'dbo.DimDate'
</pre>
<p>The next problem I encountered is when I tried to pull the table name from a variable.  </p>
<pre>
IF 1 = 2
	…
END
EXEC sp_spaceused  @objname  = ?
 </pre>
<p>Error: Parameters cannot be extracted from the SQL command….</p>
<p>I also tried declaring @objname  at the top, but that did not work either.  So I decided to change the select statement into a variable.  </p>
<p>Back on the Control Flow I created an Execute SQL Task.  I used a SELECT against  sys.tables to get a list of all fact and dimension tables. The Result Set of the task is saved to an Object variable, vTableList.  I then used a For Each Loop, for each table value in the vTableList.  I then used a Script Task to replace the table name in the select statement above.  </p>
<pre>

        Dts.Variables("vSpaceUsedSQL").Value = "IF 1 = 2 BEGIN DECLARE @SchemaStub TABLE( " &amp; _
            "TableName VARCHAR(50),TableRows VARCHAR(20),ReservedSpace VARCHAR(20),DataSpace VARCHAR(20),IndexSpace VARCHAR(20))" &amp; _
            " Select TableName,TableRows,ReservedSpace,DataSpace,IndexSpace " &amp; _
            " FROM    @SchemaStub END" &amp; _
            " EXEC sp_spaceused '" &amp; Dts.Variables("vTableName").Value &amp; "'"
 </pre>
<p>To wrap up the package<br />
	1. I added a SQL Task to delete any data from today, incase it is run twice in the same day.<br />
	2. Set the RunDateKey to the key value of GETDATE()<br />
	3. I created some pretty Reporting service reports to show my table sizes over time.</p>
<p><a href="http://key2consulting.com/Blogs/wp-content/uploads/2011/09/Load-Fact-Table-Size.jpg"><img src="http://key2consulting.com/Blogs/wp-content/uploads/2011/09/Load-Fact-Table-Size-300x142.jpg" alt="" width="300" height="142" class="alignleft size-medium wp-image-407" /></a></p>
<p><a href="http://key2consulting.com/Blogs/wp-content/uploads/2011/09/Table-Size-Report.jpg"><img src="http://key2consulting.com/Blogs/wp-content/uploads/2011/09/Table-Size-Report-300x256.jpg" alt="" width="300" height="256" class="alignleft size-medium wp-image-408" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2011/09/14/table-size-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSIS Logging and Auditing Framework</title>
		<link>http://key2consulting.com/Blogs/2011/07/28/ssis-logging-and-auditing-framework/</link>
		<comments>http://key2consulting.com/Blogs/2011/07/28/ssis-logging-and-auditing-framework/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 21:37:26 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=379</guid>
		<description><![CDATA[Thank you for all of you that came out to my presentation at the Atlanta Microsoft BI user group, last Monday. We had a pretty good turn out, 40+. The slide deck can be found on the user group web site. http://atlantabi.sqlpass.org/Resources.aspx Here are the links to the other posts that I referred to during [...]]]></description>
			<content:encoded><![CDATA[<p>Thank you for all of you that came out to my presentation at the <a href="http://atlantabi.sqlpass.org/">Atlanta Microsoft BI user group</a>, last Monday.  We had a pretty good turn out, 40+.</p>
<p>The slide deck can be found on the user group web site.  <a href="http://atlantabi.sqlpass.org/Resources.aspx">http://atlantabi.sqlpass.org/Resources.aspx</a></p>
<p>Here are the links to the other posts that I referred to during the presentation.</p>
<li><a href="http://key2consulting.com/Blogs/mwollner/2010/09/14/customize-ssis-logging-avoid-dups-in-parent-packages//">Customize SSIS Logging – Avoid dups in Parent Packages</a>
</li>
<li>
<a href="http://key2consulting.com/Blogs/2011/07/13/table-auditing-with-xml/">Table Auditing with XML</a></li>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2011/07/28/ssis-logging-and-auditing-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Table Auditing with XML</title>
		<link>http://key2consulting.com/Blogs/2011/07/13/table-auditing-with-xml/</link>
		<comments>http://key2consulting.com/Blogs/2011/07/13/table-auditing-with-xml/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 20:18:38 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Auditing]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL 2008]]></category>
		<category><![CDATA[SQLServer]]></category>
		<category><![CDATA[Trigger]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XQuery]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=323</guid>
		<description><![CDATA[When working with meta data tables it can be very useful to track when people make changes to the data. How do you track any change against any number of columns for any table? I have implemented a fairly simple solution that uses triggers and stores all changes as XML into one change log table. [...]]]></description>
			<content:encoded><![CDATA[<div>When working with meta data tables it can be very useful to track when people make changes to the data.  How do you track any change against any number of columns for any table? I have implemented a fairly simple solution that uses triggers and stores all changes as XML into one change log table.
</div>
<p></p>
<div>I know <a href="http://msdn.microsoft.com/en-us/library/ms189799.aspx">triggers </a>are very expensive and should be avoided unless the are truly needed.  There are several DBAs out there that abuse them and I am sent into help figure out why their performance is so bad.  I feel that in this instance they can be quite handy.  Again, this is intended for meta data table or smaller tables.  If you are working on large tables, this can significantly slow down updates to the table.
</div>
<p></p>
<div><strong>The table</strong><br />
The logging table has the Table Name, Previous Records as XML, Current Records as XML, User, Time Stamp.</div>
<p></p>
<pre>	CREATE TABLE dbo.MetaDataChangeLog(
		MetaDataChangeLogId INT IDENTITY(1,1) NOT NULL,
		TableName VARCHAR(255) NOT NULL,
		PreviousRowXmlValues XML NULL,
		CurrentRowXmlValues XML NULL,
		RowCreateSource VARCHAR(255) NOT NULL,
		RowCreateDateTime DATETIME NOT NULL,
	 CONSTRAINT PK_MetaDataChangeLogId PRIMARY KEY CLUSTERED (MetaDataChangeLogId ASC)
	) 

	ALTER TABLE dbo.MetaDataChangeLog ADD  DEFAULT (GETDATE()) FOR RowCreateDateTime
	GO</pre>
<p></p>
<div><strong>The Trigger</strong> (I am going to use my SSIS Config table in this example).<br />
The trigger is going to be set up for AFTER INSERT, UPDATE, DELETE.  It then does a SELECT *, from the INSERT and DELETE data sets, FOR XML AUTO.  Updates have both an insert and a delete.  The insert will have a delete value of NULL and vice versa.</div>
<p></p>
<pre>	CREATE TRIGGER ETL.trSSISConfigurationsChangeLog
	   ON   ETL.SSISConfigurations
	   AFTER INSERT,UPDATE,DELETE
	AS
	BEGIN
		SET NOCOUNT ON;

		DECLARE @previousRowXmlValues XML
		DECLARE	@currentRowXmlValues XML
		DECLARE @rowCreateSource VARCHAR(100)

		--Get the previous value
		SET @previousRowXmlValues = (SELECT * FROM DELETED FOR XML AUTO)
		--Get the current value
		SET @currentRowXmlValues = (SELECT * FROM INSERTED FOR XML AUTO)
		--Gets the SQL User that has made the update
		SET @rowCreateSource = SYSTEM_USER

		-- Insert the changes into the Log table
		INSERT INTO MetaDataChangeLog(
			TableName, PreviousRowXmlValues, CurrentRowXmlValues, RowCreateSource)
		VALUES (
			'ETL.SSISConfigurations',	@PreviousRowXmlValues, @CurrentRowXmlValues, @RowCreateSource)
	END</pre>
<div><strong>The Data</strong><br />
This is what some sample data looks like.  I inserted a row, updated it, then deleted it.  (If you affect more then 1 row at a time all rows will be captured in row in the same XML.</p>
<p><strong>Insert 1 row</strong><br />
<strong>PreviousRowXmlValues</strong>: NULL<br />
<strong>CurrentRowXmlValues</strong>:</div>
<pre>			&lt;INSERTED ConfigurationFilter="vTestVariable" ConfiguredValue="Test" PackagePath="\Package.Variables[User::vTestVariable].Properties[Value]" ConfiguredValueType="String" /&gt;</pre>
<p></p>
<div><strong>Update 1 row</strong><br />
<strong>PreviousRowXmlValues</strong>:</div>
<pre>			&lt;DELETED ConfigurationFilter="vTestVariable" ConfiguredValue="Test" PackagePath="\Package.Variables[User::vTestVariable].Properties[Value]" ConfiguredValueType="String" /&gt;</pre>
<div><strong>CurrentRowXmlValues</strong>:</div>
<pre>			&lt;INSERTED ConfigurationFilter="vTestVariable" ConfiguredValue="Updated Test" PackagePath="\Package.Variables[User::vTestVariable].Properties[Value]" ConfiguredValueType="String" /&gt;</pre>
<p></p>
<div><strong>Delete 2 rows</strong><br />
<strong>PreviousRowXmlValues</strong>:</div>
<pre>			&lt;DELETED ConfigurationFilter="vTestVariable2" ConfiguredValue="Test" PackagePath="\Package.Variables[User::vTestVariable].Properties[Value]" ConfiguredValueType="String" /&gt;
			&lt;DELETED ConfigurationFilter="vTestVariable" ConfiguredValue="Test" PackagePath="\Package.Variables[User::vTestVariable].Properties[Value]" ConfiguredValueType="String" /&gt;</pre>
<div><strong>CurrentRowXmlValues</strong>: NULL</p>
<p><em>Data saved in Log Table</em><br />
<a href="http://key2consulting.com/Blogs/wp-content/uploads/2011/07/Sample-Data.jpg"><br />
<img alt="" src="http://key2consulting.com/Blogs/wp-content/uploads/2011/07/Sample-Data.jpg" /><br />
</a></p>
<div><strong>View the data</strong><br />
That&#8217;s great that we now have a log of each change to our  ETL.SSISConfigurations.  But clicking on each of the XML statements is not the cleanest way to view the changes.  For this we can create a view on top of each table and use <a href="http://msdn.microsoft.com/en-us/library/ms178030.aspx">XQuery </a>to display the data.  I do a <a href="http://msdn.microsoft.com/en-us/library/ms188282.aspx">CROSS APPLY</a>, instead of an inline statement, so that if more then 1 row was affected in the change, it will be shown in the results.  You will see that 5195 has two records, one for the Delete (old value) and one for the Insert (new value).  5196 deleted 2 rows so 2 rows show up.  <a href="http://blogs.msdn.com/b/simonince/archive/2009/04/24/flattening-xml-data-in-sql-server.aspx">Simon Ince</a>gives a good example of how to flatten XML in SQL.</div>
<p><a href="http://key2consulting.com/Blogs/wp-content/uploads/2011/07/Sample-Inserted-Data.jpg"><br />
<img src="http://key2consulting.com/Blogs/wp-content/uploads/2011/07/Sample-Inserted-Data.jpg" alt="" /><br />
</a><br />
</p>
<pre>	CREATE VIEW [Audit].[vSSISConfigurationsChangeLog] AS 

	SELECT  MetaDataChangeLogId 	AS ChangeId,
			'DELETED'			AS ChangeType,
			RowCreateSource		AS ChangeSource,
			RowCreateDateTime		AS ChangeDateTime,
	        R.Data.value('(@ConfigurationFilter)[1]', 'VARCHAR(255)') AS ConfigurationFilter,
	        R.Data.value('(@ConfiguredValue)[1]', 'VARCHAR(255)') AS ConfiguredValue,
	        R.Data.value('(@PackagePath)[1]', 'VARCHAR(255)') AS PackagePath,
	        R.Data.value('(@ConfiguredValueType)[1]', 'VARCHAR(20)') AS ConfiguredValueType
	FROM    MetaDataChangeLog MDC
	CROSS APPLY MDC.PreviousRowXmlValues.nodes('/DELETED') AS R(Data)
	WHERE   TableName = 'ETL.SSISConfigurations' 

	UNION	

	SELECT  MetaDataChangeLogId 	AS ChangeId,
			'INSERTED'			AS ChangeType,
			RowCreateSource		AS ChangeSource,
			RowCreateDateTime		AS ChangeDateTime,
			R.Data.value('(@ConfigurationFilter)[1]', 'VARCHAR(255)') AS ConfigurationFilter,
	        R.Data.value('(@ConfiguredValue)[1]', 'VARCHAR(255)') AS ConfiguredValue,
	        R.Data.value('(@PackagePath)[1]', 'VARCHAR(255)') AS PackagePath,
	        R.Data.value('(@ConfiguredValueType)[1]', 'VARCHAR(255)') AS ConfiguredValueType
	FROM    MetaDataChangeLog MDC
	CROSS APPLY MDC.CurrentRowXmlValues.nodes('/INSERTED') AS R(Data)
	WHERE   TableName = 'ETL.SSISConfigurations'</pre>
<p></p>
<div>Now we have a single table that will track all data changes.  You can quickly query the table to view the data or you can write a XQuery against the XML and work with it as if it was a table.</div>
<p></p>
<div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2011/07/13/table-auditing-with-xml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Presenting @ Atlanta Microsoft BI user group</title>
		<link>http://key2consulting.com/Blogs/2011/07/13/presenting-atlanta-microsoft-bi-user-group/</link>
		<comments>http://key2consulting.com/Blogs/2011/07/13/presenting-atlanta-microsoft-bi-user-group/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 19:24:23 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[Atlanta]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Auditing]]></category>
		<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[PASS]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL 2008]]></category>
		<category><![CDATA[SQLServer]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=339</guid>
		<description><![CDATA[I will be presenting at the next Atlanta Microsoft BI user group. Monday, July 25th, 2011. http://atlantabi.sqlpass.org/ Topic: SSIS Logging and Auditing Framework Level: Beginer / Intermediate Meeting Place Matrix Resources 115 Perimeter Center Place Suite 250 (South Terraces Building) Atlanta, GA 30346 Overview: Proper logging in your SSIS packages can help save hours in [...]]]></description>
			<content:encoded><![CDATA[<p>I will be presenting at the next Atlanta Microsoft BI user group. Monday, July 25th, 2011.<br />
<a href="http://atlantabi.sqlpass.org/">http://atlantabi.sqlpass.org/</a></p>
<p>Topic: 	SSIS Logging and Auditing Framework<br />
	Level: Beginer / Intermediate</p>
<p>Meeting Place<br />
Matrix Resources<br />
115 Perimeter Center Place<br />
Suite 250 (South Terraces Building)<br />
Atlanta, GA 30346</p>
<p>Overview: Proper logging in your SSIS packages can help save hours in determining what went wrong with your package execution.  Auditing may be required to track what package touched what data and when.  This session will review some best practices in setting up logging and auditing, walk through a standardized SSIS template that can be easily used as a starting point for all SSIS packages and review a reporting solution to quickly monitor your new package logs.</p>
<p>About Me: Matt Wollner in a Business Intelligence consultant with Key2 Consulting.  He has extensive experience in data warehousing design, SQL Server database, ETL processes, multidimensional database and reporting systems.   He has been working with SQL server products for the past 13 years with a focus on BI for the last 10 years.  Matt has successfully delivered large scale data warehousing solutions utilized by companies in the telecom, financial services, information aggregation, pharmaceutical and state and local governments.</p>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2011/07/13/presenting-atlanta-microsoft-bi-user-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Avoiding dups when querying sysssislog</title>
		<link>http://key2consulting.com/Blogs/2011/05/02/avoiding-dups-when-querying-sysssislog/</link>
		<comments>http://key2consulting.com/Blogs/2011/05/02/avoiding-dups-when-querying-sysssislog/#comments</comments>
		<pubDate>Mon, 02 May 2011 16:05:17 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[SSIS]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL 2008]]></category>
		<category><![CDATA[T-SQL]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=299</guid>
		<description><![CDATA[Last year I blogged about Avoiding dups in Parent Packages, when using custom logging. Todd McDermind has a good post on how to query the sysssislog table, if you are using the built in SQL SSIS logging. http://toddmcdermid.blogspot.com/2011/04/transforming-ssis-sysssislog-entries.html]]></description>
			<content:encoded><![CDATA[<p>Last year I blogged about <a href="http://key2consulting.com/Blogs/mwollner/2010/09/14/customize-ssis-logging-avoid-dups-in-parent-packages/">Avoiding dups in Parent Packages, when using custom logging</a>.  </p>
<p>Todd McDermind has a good post on how to query the <a href="http://technet.microsoft.com/en-us/library/ms186984.aspx">sysssislog table</a>, if you are using the built in SQL <a href="http://msdn.microsoft.com/en-us/library/ms138020.aspx">SSIS logging</a>.</p>
<p><a href="http://toddmcdermid.blogspot.com/2011/04/transforming-ssis-sysssislog-entries.html">http://toddmcdermid.blogspot.com/2011/04/transforming-ssis-sysssislog-entries.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2011/05/02/avoiding-dups-when-querying-sysssislog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parse XML in SSIS</title>
		<link>http://key2consulting.com/Blogs/2011/02/26/parse-xml-in-ssis/</link>
		<comments>http://key2consulting.com/Blogs/2011/02/26/parse-xml-in-ssis/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 03:08:51 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL 2008]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XML Source]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=232</guid>
		<description><![CDATA[One of the built in data sources in in SSIS is an XML document. I started writing a package to pull data from XML stored in a SQL table. I noticed that there were several little gotchas that I had to work around to get the data the way I wanted. The XML file can [...]]]></description>
			<content:encoded><![CDATA[<p>One of the built in data sources in in <a href="http://msdn.microsoft.com/en-us/library/ms139886.aspx">SSIS is an XML document</a>. I started writing a package to pull data from XML stored in a SQL table. I noticed that there were several little gotchas that I had to work around to get the data the way I wanted.</p>
<ol>
<li>The XML file can only contain 1 namespace. I had to do a string replace in my TSQL to remove the namespaces and keep the element names unique.</li>
<p><b>Original XML</b></p>
<pre>
&lt;root&gt;
&lt;h:table xmlns:h="http://www.w3.org/TR/html4/"&gt;
&lt;h:tr&gt;
&lt;h:td&gt;Apples&lt;/h:td&gt;
&lt;h:td&gt;Bananas&lt;/h:td&gt;
&lt;/h:tr&gt;
&lt;/h:table&gt;
&lt;f:table xmlns:f="http://www.w3schools.com/furniture"&gt;
&lt;f:name&gt;African Coffee Table&lt;/f:name&gt;
&lt;f:width&gt;80&lt;/f:width&gt;
&lt;f:length&gt;120&lt;/f:length&gt;
&lt;/f:table&gt;
&lt;/root&gt;
</pre>
<p><b>TSQL Replace</b></p>
<pre>
SELECT
REPLACE(
REPLACE(
REPLACE(@XML,'&lt;f:table xmlns:f="http://www.w3schools.com/furniture"&gt;','&lt;f:table&gt;')
,'&lt;h:table xmlns:h="http://www.w3.org/TR/html4/"&gt;','&lt;h:table&gt;')
 ,':','-')
</pre>
<p><b>Final XML</b></p>
<pre>
&lt;root&gt;
&lt;h-table&gt;
&lt;h-tr&gt;
&lt;h-td&gt;Apples&lt;/h-td&gt;
&lt;h-td&gt;Bananas&lt;/h-td&gt;
&lt;/h-tr&gt;
&lt;/h-table&gt;
&lt;f-table&gt;
&lt;f-name&gt;African Coffee Table&lt;/f-name&gt;
&lt;f-width&gt;80&lt;/f-width&gt;
&lt;f-length&gt;120&lt;/f-length&gt;
&lt;/f-table&gt;
&lt;/root&gt;
</pre>
<li>Each child element in the XML file will get its own data flow output. If you are looking to flatten out the XML file you will need to join each output together. The XML source conveniently added a _id for each level in the XML. If you sort these, they can be joined together. In the XML below both the food and nutrition outputs with have a food_id. We you join the two outputs on the food_id the calories and fat data will be flattened out to the same row as the other food information.</li>
<pre>

&lt;breakfast_menu&gt;
&lt;food&gt;
&lt;name&gt;Belgian Waffles&lt;/name&gt;
&lt;price&gt;$5.95&lt;/price&gt;
&lt;description&gt;two of our famous Belgian Waffles with plenty of real maple syrup&lt;/description&gt;
&lt;nutrition&gt;
&lt;calories&gt;650&lt;/calories&gt;
&lt;fat&gt;13&lt;/fat&gt;
&lt;/nutrition&gt;
&lt;/food&gt;
&lt;food&gt;
&lt;name&gt;Strawberry Belgian Waffles&lt;/name&gt;
&lt;price&gt;$7.95&lt;/price&gt;
&lt;description&gt;light Belgian waffles covered with strawberries and whipped cream&lt;/description&gt;
&lt;nutrition&gt;
&lt;calories&gt;900&lt;/calories&gt;
&lt;fat&gt;27&lt;/fat&gt;
&lt;/nutrition&gt;
&lt;/food&gt;
&lt;/breakfast_menu&gt;
</pre>
<li>The <a href="http://technet.microsoft.com/en-us/library/ms139886(SQL.90).aspx">XML source can pull data from an XML file on disk or from a variable</a>. If you are moving you package to multiple environments you will want to have the path of the XML file to be dynamic. This is easy by either creating a variable that contains the full file path of the XML file (XML file from variable) or in the control flow, pulling the value of the XML document and storing the XML in a string variable (XML data from variable). The one problem of this is that, in the data flow, there is no way to make the XSD dynamic. In order to add an expression to the XML Source, you must go back to the Control Flow and set an expression to the Data Flow for the [XML Source].[XMLSchemaDefinition].</li>
<li>And finally, your XML may not be formatted. If you open the XML in Management Studio you can format it quickly. Click on Edit &#8211;&gt;Advanced &#8211;&gt; Format (Ctrl+K, Ctrl+D)</li>
</ol>
<div id="attachment_245" class="wp-caption alignnone" style="width: 274px"><a href="http://key2consulting.com/Blogs/wp-content/uploads/2011/02/Format.jpg"><img src="http://key2consulting.com/Blogs/wp-content/uploads/2011/02/Format-264x300.jpg" alt="Format XML in SSMS" width="264" height="300" class="size-medium wp-image-245" /></a><p class="wp-caption-text">Format XML in SSMS</p></div>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2011/02/26/parse-xml-in-ssis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looping through files on an FTP server</title>
		<link>http://key2consulting.com/Blogs/2011/02/26/looping-through-files-on-an-ftp-server/</link>
		<comments>http://key2consulting.com/Blogs/2011/02/26/looping-through-files-on-an-ftp-server/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 03:05:22 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[SQLServerPedia Syndication]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL 2008]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=228</guid>
		<description><![CDATA[I have always know that that SSIS has an FTP control Flow task, but I have never tried to use.  Turn out that the task is fairly limited and can be a pain to work with.  I am attempting to get a list of all files, in a folder, on an FTP server.   The FTP [...]]]></description>
			<content:encoded><![CDATA[<p>I have always know that that SSIS has an <a href="http://msdn.microsoft.com/en-us/library/ms179917.aspx">FTP control Flow task</a>, but I have never tried to use.  Turn out that the task is fairly limited and can be a pain to work with.  I am attempting to get a list of all files, in a folder, on an FTP server.   The FTP Task is designed to send and receive files and folders via FTP.  The other problem that I was having is I could not save the FTP password with a configuration.  The connection string for an FTP connection only includes the site and port, not the user or password.</p>
<p>I did the following to get my list of files</p>
<ol>
<li>Create an FTP Connection manager.  I named mine connFTP.  You do not have to file in all the info here.  We will overwrite it in a Script Task.  You will need to put something in the server name.  </li>
<li>Create package variables
<ol>
<li>One for each of the following  FTP server, port, user name and password. </li>
<li>A variable for the path to the files, if the files are not in the FTP root directory, vFTPFileDir.  In my case this looked like &#8220;/user name/working folder&#8221;</li>
<li>A variable to store the file list, of type Object,   vFTPFileList.</li>
</ol>
</li>
<li>Create a script Task (this example is in VB)</li>
<pre> 

'1st we must set up the connection to the FTP server

Dim cmFTP As ConnectionManager = Dts.Connections("connFTP")

'Set the FTP connection properties like username &amp; password

cmFTP.Properties("ServerName").SetValue(cmFTP, Dts.Variables("vFTPConnectionString").Value

cmFTP.Properties("ServerUserName").SetValue(cmFTP, Dts.Variables("vFTPUserName").Value)cmFTP.Properties("ServerPassword").SetValue(cmFTP, Dts.Variables("vFTPPassword").Value)cmFTP.Properties("ServerPort").SetValue(cmFTP,  Dts.Variables("vFTPPort").Value)

'Next we will connect to the FTP Server

'create the FTP object that sends the files and pass it the connection created above.

Dim FtpCC As FtpClientConnection = New FtpClientConnection(cmFTP.AcquireConnection(Nothing))

'Connects to the ftp server

 FtpCC .Connect()

'Navigates to the directory in the FTP site

 ftpVentive.SetWorkingDirectory(Dts.Variables("vFTPFileDir").Value)

'Finally  we want to store the list of files to the variable

'Declare the string arrays

Dim saFileNames() As String = Nothing

Dim saFolderNames() As String = Nothing

'Store a list of folders and files into string arrays

FtpCC .GetListing(saFolderNames, saFileNames)

'Set the variable to the file list

 Dts.Variables("vFTPFileList").Value = saFileNames

'This part is optional to loop through each file

 If Not saFileName Is Nothing Then

For Each sFileName As String In saFileNames

'Do Something

Next

End If

'Close the FTP connection

ftpVentive.Close()

Dts.TaskResult = ScriptResults.Success
</pre>
<p> </p>
<li>Add a <a href="http://msdn.microsoft.com/en-us/library/ms141724.aspx">Foreach Loop Container</a>
<ol>
<li>Set the enumerator to Foreach From Variable Enumerator</li>
<li>Set the variable to vFTPFileList</li>
</ol>
</li>
</ol>
<p>There you have it.  You can now store a list of all the files in an FTP directory and loop through it in a Script Task or in a Foreach Task.</p>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2011/02/26/looping-through-files-on-an-ftp-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Step By Step PowerPivot using Excel Data</title>
		<link>http://key2consulting.com/Blogs/2010/12/17/step-by-step-powerpivot-using-excel-data/</link>
		<comments>http://key2consulting.com/Blogs/2010/12/17/step-by-step-powerpivot-using-excel-data/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 15:55:09 +0000</pubDate>
		<dc:creator>Matt Wollner</dc:creator>
				<category><![CDATA[PowerPivot]]></category>
		<category><![CDATA[Business Intelligence]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Excel 2010]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Office 2010]]></category>
		<category><![CDATA[Power Pivot]]></category>
		<category><![CDATA[Slicer]]></category>

		<guid isPermaLink="false">http://key2consulting.com/Blogs/?p=166</guid>
		<description><![CDATA[This post is a step by step beginner&#8217;s guide to PowerPivot.  I will show the basics of creating a PowerPivot workbook using Excel data.  PowerPivot has dramatically improved the way in which we can analyze our data in Excel.  Using PowerPivot in an Excel PivotChart provides the added benefit of Slicers.   Slicers are a cool new [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a step by step beginner&#8217;s guide to <a href="http://www.powerpivot.com/">PowerPivot</a>.  I will show the basics of creating a PowerPivot workbook using Excel data.  PowerPivot has dramatically improved the way in which we can analyze our data in Excel.  Using PowerPivot in an Excel PivotChart provides the added benefit of <a href="http://technet.microsoft.com/en-us/bi/Video/gg394190">Slicers</a>.   Slicers are a cool new way to quickly slice and dice your data. </p>
<p>I am using data that I pulled off the<a href="http://2010.census.gov/2010census/data/"> US Census </a>web page. I was able to download three CSV files (<a href="http://2010.census.gov/2010census/data/pop_change.csv">Population Change</a>, <a href="http://2010.census.gov/2010census/data/pop_density.csv">Population Density</a>, <a href="http://2010.census.gov/2010census/data/apportionment.csv">Apportionment</a> ). I did a couple of quick data modifications.  The data in the files is stored with a new column for each year. I created a new column called year and unpivoted the data. I then took the data from the three files and merged them into one Excel spreadsheet. I also create a 2nd workbook for the <a href="http://www.census.gov/popest/geographic/codes02.html">region information</a>.</p>
<p><a href="http://cid-e65926bfd8ff2978.office.live.com/view.aspx/PowerPivot/Census%202000%20State%20Data%20-%20Source%20Data.xlsx">&#8230;Dowload Source Spreadsheet</a></p>
<p><a href="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/Sample-Data.jpg"><img class="alignnone size-medium wp-image-173" src="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/Sample-Data-300x95.jpg" alt="" width="300" height="95" /></a></p>
<p>There are two easy ways to pull data from an existing Excel spreadsheet. You can open an existing spreadshhet and convert the data into Excel Table or you can open a blank spreadsheet and import the data. I will first show how to import data within a existing spreadsheet.</p>
<ol>
<li>Start open the census spreadsheet in Excel 2010 (Make sure <a href="http://www.powerpivot.com/download.aspx">PowerPivot</a> is already installed)</li>
<li>Under the PowerPivot ribbon select &#8220;Create Linked Table&#8221;. Select the entire set of census data. This will convert the existing set of data into an Excel Table and will open the PowerPivot browser.
<ol>
<li>Inside the PowerPivot browser rename the table to Population</li>
<li>Now that the data is in PowerPivot, the data can be sorted by any column, really quickly.</li>
</ol>
<p><a href="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/Create-Linked-Table.jpg"><img class="alignnone size-medium wp-image-167" src="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/Create-Linked-Table-300x142.jpg" alt="" width="300" height="142" /></a>  <a href="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/PowerPivot.jpg"><img class="alignnone size-medium wp-image-172" src="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/PowerPivot-300x197.jpg" alt="" width="300" height="197" /></a></li>
<li>Close the PowerPivot browser and import the region data.
<ol>
<li>Open the Region worksheet. Hit Create Linked Table. Select the data range.</li>
<li>Now the Region data has been added as a 2nd table in PowerPivot.</li>
<li>Rename the table to Region.</li>
</ol>
</li>
<li>We now have two separate datasets. We need to tell PowerPivot how these two sets of data are related.
<ol>
<li>Under the Design Ribbon select Create Relationship. The Create Relationship popup will appear.</li>
<li>Select the State Column from each of the two tables that have been created.</li>
<li>You can see that this column now has a relationship.</li>
</ol>
<p><a href="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/Created-Relationship.jpg"><img class="alignnone size-medium wp-image-169" src="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/Created-Relationship-300x213.jpg" alt="" width="300" height="213" /></a>  <a href="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/Created-Relationship-2.jpg"><img class="alignnone size-medium wp-image-168" src="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/Created-Relationship-2-300x113.jpg" alt="" width="300" height="113" /></a></li>
<li>Now lets build a simple report.
<ol>
<li>From the PowerPivot browser (or back in Excel under the PowerPivot Ribbon), select the PivotTable dropdown and select PivotChart.</li>
<li>Place the Chart on a new Worksheet</li>
<li>Under the PowerPivot Field List you will see two data sets (Population and Region)</li>
<li>Add the following
<ol>
<li>Slicers Vertical: Region, Division, State (you can use the state from either Population or Region)</li>
<li>Slicers Horizontal: Year</li>
<li>Legend Fields: Year</li>
<li>Axis Fields: State</li>
<li>Values: Population(The default will make this a SUM)</li>
</ol>
</li>
</ol>
</li>
</ol>
<p><a href="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/PivotChart.jpg"><img class="alignnone size-medium wp-image-171" src="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/PivotChart-300x161.jpg" alt="" width="300" height="161" /></a>  <a href="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/FinalChart.jpg"><img class="alignnone size-medium wp-image-170" src="http://key2consulting.com/Blogs/wp-content/uploads/2010/12/FinalChart-300x212.jpg" alt="" width="300" height="212" /></a></p>
<p>The <a href="http://technet.microsoft.com/en-us/library/ee835588.aspx">slicers </a>that have been added are a fast and easy way for you to slice and dice (filter) your data.  Each slicer is aware of the other slicers in the PowerPivot dataset.  You will notice that if you click on the Region Slicer, lets say South, both the Division and State slicers will be updated to list the Divisions and States in the South.</p>
<p><a href="http://cid-e65926bfd8ff2978.office.live.com/view.aspx/PowerPivot/Census%202000%20State%20Data%20-%20PowerPivot%20Final.xlsx">&#8230;View the final spreadsheet</a> (In order to see PowerPivot in action, you will need to open the document in Excel)</p>
]]></content:encoded>
			<wfw:commentRss>http://key2consulting.com/Blogs/2010/12/17/step-by-step-powerpivot-using-excel-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

