<?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>Davy&#039;s Blog &#187; Excel</title>
	<atom:link href="http://blog.davyknuysen.be/category/excel/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.davyknuysen.be</link>
	<description>My Blog on Microsoft BI</description>
	<lastBuildDate>Wed, 27 Jul 2011 21:30:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SSAS: Custom format string for “duration” using MDX</title>
		<link>http://blog.davyknuysen.be/2009/12/07/ssas-custom-format-string-for-duration-using-mdx/</link>
		<comments>http://blog.davyknuysen.be/2009/12/07/ssas-custom-format-string-for-duration-using-mdx/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 20:38:20 +0000</pubDate>
		<dc:creator>Davy</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[BI]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[MDX]]></category>
		<category><![CDATA[SQL 2008 R2]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQLServerPedia]]></category>
		<category><![CDATA[data]]></category>

		<guid isPermaLink="false">http://blog.davyknuysen.be/2009/12/07/ssas-custom-format-string-for-duration-using-mdx/</guid>
		<description><![CDATA[I recently struggled with the following challenge in Analysis Services: In one of the fact tables there was a field duration which actually was a duration of a certain status in seconds. I needed to display this in a readable format, like &#8220;2 days 22:15:59&#8243;. bing brought me to the following great article, where Mosha [...]]]></description>
			<content:encoded><![CDATA[<p>I recently struggled with the following challenge in Analysis Services:<br />
In one of the fact tables there was a field <strong>duration</strong> which actually was a duration of a certain status in seconds. I needed to display this in a readable format, like &#8220;2 days 22:15:59&#8243;.<br />
<strong><em></em></strong></p>
<p><strong><em><a href="http://www.bing.com">bing</a></em></strong> brought me to the following great article, where Mosha explains how you can use MDX to create a custom format:<br />
<a href="http://sqlblog.com/blogs/mosha/archive/2008/09/26/displaying-duration-values-mdx-expressions-in-format-string.aspx">http://sqlblog.com/blogs/mosha/archive/2008/09/26/displaying-duration-values-mdx-expressions-in-format-string.aspx</a></p>
<p>When you apply this for a calculated member you get something like this:</p>
<blockquote><p>    CREATE MEMBER CURRENTCUBE.[Measures].[DurationInDays]<br />
     AS [DurationInDays],<br />
    FORMAT_STRING =  <br />
        IIF([Measures].[Duration] &lt; 1<br />
         ,&#8217;&#8221;0 days&#8221; hh:mm:ss&#8217;<br />
         ,&#8217;&#8221;&#8216; + cstr(int([Measures].[Duration])) + &#8216; days&#8221; hh:mm:ss&#8217;)<br />
    ,<br />
    VISIBLE = 1;</p></blockquote>
<p>But this brings us to another problem:<br />
This custom format will only display the correct result if [Measures].[Duration] contains <em><strong>decimal seconds</strong></em>.<br />
For more information about the conversion from seconds to decimal seconds, read the following article on wikipedia: <a href="http://en.wikipedia.org/wiki/Decimal_time">http://en.wikipedia.org/wiki/Decimal_time</a><br />
In short, you need to divide the number of seconds by 86.400. The resulting number presents the number of days on the left side of the decimal separator and the remaining decimal seconds on the right side.</p>
<p>So the final result will be something like this:</p>
<blockquote><p>    CREATE MEMBER CURRENTCUBE.[Measures].[DurationInDecimalSeconds]<br />
     AS<br />
        [Measures].[DurationInSeconds] / 86400,<br />
    VISIBLE = 0;  </p>
<p>    CREATE MEMBER CURRENTCUBE.[Measures].[DurationInDays]<br />
     AS [Measures].[DurationInDecimalSeconds],<br />
    FORMAT_STRING =  <br />
        IIF([Measures].[DurationInDecimalSeconds] &lt; 1<br />
         ,&#8217;&#8221;0 days&#8221; hh:mm:ss&#8217;<br />
         ,&#8217;&#8221;&#8216; + cstr(int([Measures].[DurationInDecimalSeconds])) + &#8216; days&#8221; hh:mm:ss&#8217;)<br />
    ,<br />
    VISIBLE = 1;</p></blockquote>
<p>If you want this custom format to be displayed in Excel, make sure the connection properties are set correctly to retrieve the <strong><em>number format </em></strong>from the server:</p>
<p>Go to <em><strong>Connection Properties</strong></em>, tab <strong><em>Usage</em></strong>, and check <strong><em>Number Format</em></strong> in the <strong><em>OLAP Server Formatting</em></strong> options.</p>
<p><a href="http://blog.davyknuysen.be/wp-content/uploads/2009/12/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://blog.davyknuysen.be/wp-content/uploads/2009/12/image_thumb.png" border="0" alt="image" width="341" height="410" /></a> </p>
<p>There is one more thing I would like to tell you about these options: Normally all these options will always be checked by default, but I’ve noticed that when you start from an existing odc-file, this is not the case. So, when you’re used to deliver an odc-file to your users to start analyzing from Excel, you will have to replace this odc-file by an Excel template that connects to the cube, to make sure this option is always on.</p>
<p>There might be a better way to change this behavior for odc-files, but I couldn’t find any. If you know it, please let me know <img src='http://blog.davyknuysen.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p> </p>
<p>Enjoy!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.davyknuysen.be%2F2009%2F12%2F07%2Fssas-custom-format-string-for-duration-using-mdx%2F&amp;title=SSAS%3A%20Custom%20format%20string%20for%20%E2%80%9Cduration%E2%80%9D%20using%20MDX" id="wpa2a_2"><img src="http://blog.davyknuysen.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.davyknuysen.be/2009/12/07/ssas-custom-format-string-for-duration-using-mdx/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Excel Services: Data Refresh Failed</title>
		<link>http://blog.davyknuysen.be/2009/08/13/excel-services-data-refresh-failed/</link>
		<comments>http://blog.davyknuysen.be/2009/08/13/excel-services-data-refresh-failed/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 22:41:48 +0000</pubDate>
		<dc:creator>Davy</dc:creator>
				<category><![CDATA[BI]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Excel Services]]></category>
		<category><![CDATA[MOSS]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://blog.davyknuysen.be/?p=81</guid>
		<description><![CDATA[After deploying an Excel file to Excel Services on a new MOSS Server I got the following error: Data Refresh Failed: Unable to retrieve external data for the following connections: &#60;&#60;connection&#62;&#62; The data sources may be unreachable, may not be responding, or may have denied you access. Verify that data refresh is enabled for the [...]]]></description>
			<content:encoded><![CDATA[<p>After deploying an Excel file to Excel Services on a new MOSS Server I got the following error: </p>
<blockquote><p><em><font color="#ff0000">Data Refresh Failed: Unable to retrieve external data for the following connections:</font></em></p>
<p><em><font color="#ff0000">&lt;&lt;connection&gt;&gt;</font></em></p>
<p><em><font color="#ff0000">The data sources may be unreachable, may not be responding, or may have denied you access.</font></em></p>
<p><em><font color="#ff0000">Verify that data refresh is enabled for the trusted file location and that the workbook data authentication is correctly set.</font></em></p>
</blockquote>
<p><a href="http://blog.davyknuysen.be/wp-content/uploads/2009/08/DataRefreshFailed.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DataRefreshFailed" border="0" alt="DataRefreshFailed" src="http://blog.davyknuysen.be/wp-content/uploads/2009/08/DataRefreshFailed_thumb.png" width="644" height="241" /></a> </p>
<p>But the file was in an Excel Services Trusted Location and so was the data source. </p>
<p>Finally I found the following error message in the Sharepoint Log (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS):</p>
<blockquote><p><em><font color="#ff0000">Excel Services can not use credential delegation when it is configured to use a trusted subsystem with Windows SharePoint Server</font></em></p>
</blockquote>
<p>Ok that explains it: when they installed Excel Services on this new machine they did not configure it to use Delegation Mode. </p>
<p>To change Excel Services to use Delegation Mode, you need to use the command line tool <strong>stsadm. E</strong>xecute the following statements in a command window:</p>
<blockquote><p>Cd C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN</p>
<p>stsadm -o set-ecssecurity -accessmodel delegation -ssp <em><strong>SharedServices1</strong></em></p>
<p>stsadm -o execadmsvcjobs</p>
<p>iisreset</p>
</blockquote>
<p>This should do it. Enjoy!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.davyknuysen.be%2F2009%2F08%2F13%2Fexcel-services-data-refresh-failed%2F&amp;title=Excel%20Services%3A%20Data%20Refresh%20Failed" id="wpa2a_4"><img src="http://blog.davyknuysen.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.davyknuysen.be/2009/08/13/excel-services-data-refresh-failed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OLAP Reporting with Excel 2007: Use Member Properties!!</title>
		<link>http://blog.davyknuysen.be/2009/08/03/olap-reporting-with-excel-2007-use-member-properties/</link>
		<comments>http://blog.davyknuysen.be/2009/08/03/olap-reporting-with-excel-2007-use-member-properties/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 20:55:17 +0000</pubDate>
		<dc:creator>Davy</dc:creator>
				<category><![CDATA[Analysis Services]]></category>
		<category><![CDATA[BI]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[SQLServerPedia]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[OLAP]]></category>
		<category><![CDATA[Pivot Table]]></category>
		<category><![CDATA[Reporting]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://blog.davyknuysen.be/?p=76</guid>
		<description><![CDATA[Excel 2007 is great tool for browsing OLAP cubes. But 1 thing a lot of people don&#8217;t know about or at least don’t use enough, is Member Properties. When they want to add a property of a specific attribute, they just check this item in the field list. By using it this way, you&#8217;re kind [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Excel 2007</strong> is great tool for browsing OLAP cubes. But 1 thing a lot of people don&#8217;t know about or at least don’t use enough, is <strong>Member Properties</strong>.</p>
<p>When they want to add a property of a specific attribute, they just check this item in the field list. By using it this way, you&#8217;re kind of building hierarchies between all the selected attributes, therefore all possible relationships must be checked. This of course has a huge performance impact.</p>
<p>There is an easier and better way that also makes loading the data a lot faster: <strong>Member Properties.</strong> The relationships between Members and their Properties is defined by specifying Attribute Relationships in Analysis Services.</p>
<p>Ever saw that Tooltip in Excel when you&#8217;re hovering your mouse over a field in the Pivot Table? This Tooltip shows all available Member Properties.</p>
<p><a href="http://blog.davyknuysen.be/wp-content/uploads/2009/08/tooltip.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="tooltip" src="http://blog.davyknuysen.be/wp-content/uploads/2009/08/tooltip_thumb.jpg" border="0" alt="tooltip" width="428" height="420" /></a></p>
<p>But you can also display them on columns:</p>
<p>Click right on the field where you would like to display one or more properties for. Under &#8220;Show Properties in Report&#8221;, select the properties you would like to show.</p>
<p><a href="http://blog.davyknuysen.be/wp-content/uploads/2009/08/showproperties.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="show properties" src="http://blog.davyknuysen.be/wp-content/uploads/2009/08/showproperties_thumb.jpg" border="0" alt="show properties" width="425" height="585" /></a></p>
<p>By using Member Properties the layout will be better and your report will load<strong> a lot</strong> faster!</p>
<p><span style="text-decoration: underline;">Using Attributes:</span></p>
<p><a href="http://blog.davyknuysen.be/wp-content/uploads/2009/08/withattributes.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="with attributes" src="http://blog.davyknuysen.be/wp-content/uploads/2009/08/withattributes_thumb.jpg" border="0" alt="with attributes" width="421" height="626" /></a></p>
<p><span style="text-decoration: underline;">Using Properties:</span></p>
<p><a href="http://blog.davyknuysen.be/wp-content/uploads/2009/08/withproperties.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="with properties" src="http://blog.davyknuysen.be/wp-content/uploads/2009/08/withproperties_thumb.jpg" border="0" alt="with properties" width="414" height="482" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.davyknuysen.be%2F2009%2F08%2F03%2Folap-reporting-with-excel-2007-use-member-properties%2F&amp;title=OLAP%20Reporting%20with%20Excel%202007%3A%20Use%20Member%20Properties%21%21" id="wpa2a_6"><img src="http://blog.davyknuysen.be/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.davyknuysen.be/2009/08/03/olap-reporting-with-excel-2007-use-member-properties/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

