<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Dave's Adventures in Business Intelligence</title>
	<atom:link href="http://www.dagira.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagira.com</link>
	<description>...you are in a twisty maze of passageways, all different...</description>
	<lastBuildDate>Fri, 12 Mar 2010 00:57:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" -->
		<copyright>&#xA9; </copyright>
		<managingEditor>blogmaster@dagira.com ()</managingEditor>
		<webMaster>blogmaster@dagira.com()</webMaster>
		<category></category>
		<ttl>1440</ttl>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>...you are in a twisty maze of passageways, all different...</itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>blogmaster@dagira.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.dagira.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.dagira.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>Dave's Adventures in Business Intelligence</title>
			<link>http://www.dagira.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>Xcelsius Contest on SCN</title>
		<link>http://www.dagira.com/2010/03/11/xcelsius-contest-on-scn/</link>
		<comments>http://www.dagira.com/2010/03/11/xcelsius-contest-on-scn/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 00:57:31 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[Dashboard Techniques]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=246</guid>
		<description><![CDATA[Jason Cao, one of the Business Objects Community Evangelists at the SAP Community Network (SCN) has an interesting challenge for Xcelsius developers. He has posted some very simple data and asked for folks to jazz it up with Xcelsius. 
Xcelsius Challenge for Community Poll Results
If you&#8217;re interested, you have until April 30, 2010 to enter [...]]]></description>
			<content:encoded><![CDATA[<p>Jason Cao, one of the Business Objects Community Evangelists at the SAP Community Network (SCN) has an interesting challenge for Xcelsius developers. He has posted some very simple data and asked for folks to jazz it up with Xcelsius. </p>
<p><a href="http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/18219">Xcelsius Challenge for Community Poll Results</a></p>
<p>If you&#8217;re interested, you have until April 30, 2010 to enter your submission.</p>
<p>I&#8217;m thinking of creating a pie chart. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2010/03/11/xcelsius-contest-on-scn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SORT_BY_NO=NO? Very Confusing&#8230;</title>
		<link>http://www.dagira.com/2010/03/04/sort_by_nono-very-confusing/</link>
		<comments>http://www.dagira.com/2010/03/04/sort_by_nono-very-confusing/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 18:33:25 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[Universe Design]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=245</guid>
		<description><![CDATA[This has to be the parameter with the worst. Name. Ever. But let me start at the beginning.
Some databases require you to use actual column names in an ORDER BY clause. Like this:
select first_name, last_name, phone
from employee
order by last_name, first_name
Other databases let you take a shorter approach and sort by the position of the column [...]]]></description>
			<content:encoded><![CDATA[<p>This has to be the parameter with the worst. Name. Ever. But let me start at the beginning.</p>
<p>Some databases require you to use actual column names in an ORDER BY clause. Like this:</p>
<p><code>select first_name, last_name, phone<br />
from employee<br />
order by last_name, first_name</code></p>
<p>Other databases let you take a shorter approach and sort by the position of the column in the select clause, Like this:</p>
<p><code>select first_name, last_name, phone<br />
from employee<br />
order by 2, 1</code></p>
<p>To be honest, I don&#8217;t like the shortcut. I would rather see explicit column names in my order by because that way I know exactly what is being sorted without having to refer back to the select clause. Another advantage is that if the objects in my select ever change, my order by is not affected.</p>
<p>There is a parameter found in the .PRM file for each database named SORT_BY_NO. When you see that name, what do you think it is? Every time I see it I assume that it is used to determine whether the SQL will contain numbers in the ORDER BY clause like <code>order by 2, 1</code> instead of <code>order by last_name, first_name</code>. But that&#8217;s not what it does at all. Instead of doing what I described above, this parameter is used to determine if a query can be sorted by a column that does not appear in the select clause. That makes sense, doesn&#8217;t it? <img src='http://www.dagira.com/wp-includes/images/smilies/icon_rolleyes.gif' alt=':roll:' class='wp-smiley' />  It should be called SORT_BY_IN_SELECT or something. But it&#8217;s not, and here&#8217;s how it works.<span id="more-245"></span></p>
<h3>Sorting By &#8220;Something Else&#8221;</h3>
<p>I have a period calendar table where the period names are P01, P02, and so on. The years are fiscal years 2009, 2010, 2011, and on from there as you would expect. The user expects to pick a period and year combination. However, they want to see it in that order&#8230; period, and then year. As a designer I can easily combine the two values together in the format PPP YYYY with a concatenation operation. But then the LOV displays in alphabetical rather than chronological order. So I see this:</p>
<p>P01 2008<br />
P01 2009<br />
P01 2010<br />
P01 2011<br />
P02 2008<br />
P02 2009<br />
&#8230;</p>
<p>Instead of this:</p>
<p>P01 2008<br />
P02 2008<br />
P03 2008<br />
&#8230;<br />
P01 2009<br />
P02 2009<br />
P03 2009<br />
&#8230;</p>
<p>This is not what the user expects or requires, but is easily solved by editing the LOV query and adding a custom ORDER BY clause like this:</p>
<p><code>select period || ' ' || year<br />
from fiscal_calendar<br />
order by period_start_date</code></p>
<p>Sorting by the period start date would cause the alphabetical list to be sorted chronologically instead. However, doing any sort of manual editing &#8211; even in a simple LOV query &#8211; is something I want to avoid. Any time I have to click the &#8220;do not regenerate SQL&#8221; option it leaves me open for problems later on. I could add the start date to my query and sort it normally. However, I don&#8217;t want to do that as it would clutter the display.</p>
<h3>Setting SORT_BY_NO=NO</h3>
<p>This parameter is found in the .PRM file that belongs to the database engine referenced by a universe. In the old days the format of the .PRM file was the same as that found in a Windows .INI file. Today they use an XML structure instead. By default the SORT_BY_NO parameter is set to YES, so the line in the file looks like this:</p>
<p><code>&lt;Parameter Name="SORT_BY_NO"&gt;YES&lt;/Parameter&gt;</code></p>
<p>Clear as mud, yes? no? <img src='http://www.dagira.com/wp-includes/images/smilies/icon_lol.gif' alt=':lol:' class='wp-smiley' />  What it means is that yes, it is true; I cannot sort by something that does not appear in the select clause.</p>
<p>First I need to determine if my database allows me to sort by a column that does not appear in the select; Oracle and Teradata both do and I imagine others do as well. Changing this parameter won&#8217;t do me any good if the database does not support the technique. Next, I can find this file on my computer where I have Designer installed. The actual location will vary based on the installed path. The file name will be DBNAME.PRM, or in my case <code>teradata.prm</code>. I opened the file with a simple text editor, found the line shown above, and changed the value from YES to NO. It&#8217;s now a double-negative. It says, if I can paraphrase:</p>
<p>&#8220;It is NOT TRUE that I CANNOT sort by something NOT in the select&#8221;</p>
<p>or rather</p>
<p>&#8220;I is TRUE that I CAN sort by something NOT in the select&#8221;</p>
<p>Very clear, I am sure.</p>
<h3>The Results</h3>
<p>Before this change was made the &#8220;manage sorts&#8221; button on the query panel for editing LOV definitions in Designer was never available. After making this change, saving the file, and restarting Designer, I can now click this button.</p>
<p><img src="/tips/sort_by_no/toolbar.jpg" alt="toolbar image" title="Sort by button on query panel toolbar" border="0" width="243" height="49" /></p>
<p>When I click that button I get a list of objects from my universe. These objects do not have to appear in the select clause but can now appear in the sort clause. Problem solved.</p>
<p>But only after I set SORT_BY_NO equal to NO rather than YES in my parameter file.</p>
<p>By finally writing this down as a blog post, I hope that I will remember this the next time I get a new laptop and won&#8217;t have to spend time searching for the parameter setting that allows me to do this. I hope it helps someone else as well, but mainly this one is just for me. It happens that way sometimes. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2010/03/04/sort_by_nono-very-confusing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Want To Crash Teradata? Give It Some LOV&#8230;</title>
		<link>http://www.dagira.com/2010/02/26/want-to-crash-teradata-give-it-some-lov/</link>
		<comments>http://www.dagira.com/2010/02/26/want-to-crash-teradata-give-it-some-lov/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 14:27:46 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[Universe Design]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=240</guid>
		<description><![CDATA[Five easy steps to crash your Teradata system:

Step 1: Upgrade to Teradata version 13
Step 2: Recognize that with this version a &#8220;distinct&#8221; query no longer returns sorted results
Step 3: On the advice of Teradata, reconfigure your box with the &#8220;regression&#8221; parameter that makes distinct queries behave the way they did in 6.2
Step 4: Send a [...]]]></description>
			<content:encoded><![CDATA[<p>Five easy steps to crash your Teradata system:</p>
<ul>
<li>Step 1: Upgrade to Teradata version 13</li>
<li>Step 2: Recognize that with this version a &#8220;distinct&#8221; query no longer returns sorted results</li>
<li>Step 3: On the advice of Teradata, reconfigure your box with the &#8220;regression&#8221; parameter that makes distinct queries behave the way they did in 6.2</li>
<li>Step 4: Send a Business Objects LOV query to the database that includes a DISTINCT keyword and a where clause with a couple of constant values</li>
<li>Step 5: Watch the system reboot</li>
</ul>
<p>That&#8217;s about what happened to us a few days ago. It wasn&#8217;t pretty. It took a long time to get our production box upgraded (and this after seeing development and Q/A roll through the upgrades with flying colors). Once the upgrade was finally completed, we had catch-up work as far as batch processing to do. Once that was complete the users got back into the system&#8230; only to see it sporadically reboot.</p>
<p>With a personal computer or laptop, a sporadic reboot is often a loose connection or faulty piece of hardware. We had not experienced anything like this on our database servers. Ultimately someone figured out that the following query was at fault:</p>
<p><code>select DISTINCT table.column FROM table WHERE table.column in ('A','B')</code></p>
<p>That&#8217;s a fairly innocuous query, isn&#8217;t it? At first someone thought the table was corrupt. Nope, it checks out fine. Next someone suggested that the data in the table was bad. Nope, I can query it just fine. Then we thought maybe the fact that there were some special characters in the where clause was the problem. Nope, they work fine too. Finally it was narrowed all the way down to the fact that we had a DISTINCT clause with the where clause and the regression parameter set on our database. <span id="more-240"></span></p>
<p>Once we had identified the specific cause, there were three factors to consider. First, we needed the where clause on the LOV in order to deliver the proper list of choices to the business. So that could not really change. The Teradata DBA team had set a parameter to make TD13 work like TD6.2 as far as providing a &#8220;distinct&#8221; and sorted LOV result. Could we work with that instead? If I removed the &#8220;distinct&#8221; from the LOV query then Teradata no longer rebooted. However, the results of the LOV were no longer sorted, and that presented a new challenge.</p>
<h3>Universe Parameters To The Rescue</h3>
<p>There are a couple of universe parameters that were used to solve this issue. Side note: it was back in 6.0 (I believe) that the ability to override universe parameter settings within the Designer application first appeared. Prior to that version any parameter changes were applied via a configuration file. Any changes made then affected every universe that used that parameter file (there was a different one for each database). Today I can change individual universes, which is good. So what changes did I make?</p>
<h3>Universe Parameter: DISTINCT</h3>
<p>The first change was to change the setting for the DISTINCT parameter. By default this parameter value is set to DISTINCT, which seems redundant. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It essentially becomes DISTINCT=DISTINCT. However there is another option, that being GROUPBY. Note that there are no underscores or spaces in that phrase. With the setting updated to DISTINCT=GROUPBY my LOV queries no longer included the &#8220;distinct&#8221; keyword at the top of the query. Instead of this:</p>
<p><code>select DISTINCT table.column from table</code></p>
<p>I see this:</p>
<p><code>select table.column from table group by 1</code></p>
<p>There is another parameter that controls whether I see <code>group by 1</code> or <code>group by table.column</code> and that depends on whether a database supports that syntax or not.</p>
<p>This change solved the first half of the issue. Without a &#8220;distinct&#8221; the LOV queries would no longer cause the server to reboot. This was certainly a positive step. However, making this change had an important side effect: the LOV results were unique because of the GROUP BY clause, but they were no longer sorted.</p>
<h3>Universe Parameter: FORCE_SORTED_LOV</h3>
<p>The second parameter that I changed was FORCE_SORTED_LOV. The default value is <code>No</code> and I changed it to <code>Yes</code> instead. The theory behind this parameter is simple: it would force the LOV results to be sorted. Before I changed the parameter my LOV query looked like this:</p>
<p><code>select table.column from table group by 1</code></p>
<p>After applying this change, my LOV query looked like this:</p>
<p><code>select table.column from table group by 1</code></p>
<p>Hm. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_eek.gif' alt=':shock:' class='wp-smiley' />  Not what I expected. I was looking for an ORDER BY clause at the end of the query and I was not seeing one.</p>
<p>I went ahead and saved the universe and exported it to the Q/A system. We ran a few test queries (including one using the problem LOV definition mentioned above) and everything worked fine. Short LOV results were sorted. Long LOV result sets were also sorted, and they were still &#8220;paged&#8221; like I expected them to be. It still bothered me that I wasn&#8217;t seeing an ORDER BY clause in the LOV query definition, but obviously the sort was happening somewhere. We speculated that perhaps the Web Intelligence server was applying the sort which raised some concerns. LOV performance definitely suffered during the upgrade from 6.5 to XI and I didn&#8217;t want to introduce anything that would cause it to degrade further.</p>
<p>Fortunately one of the Teradata DBA team found the LOV queries in the logs, and despite the fact that no ORDER BY was showing up in the SQL when I viewed it via Designer, it was really there by the time Teradata got the query request.</p>
<h3>Wrap Up</h3>
<p>Ultimately the two universe parameters (DISTINCT and FORCE_SORTED_LOV) were used to change how LOV queries were generated, which allowed the Teradata DBA team to revert back to a standard version 13 installation (without the regression parameter turned on). I imagine that the Teradata engineering team is busy working on the bug and it will be fixed soon, so if you are using Teradata and looking at a version 13 upgrade at some point later this year you probably won&#8217;t encounter the same issue.</p>
<p>But it&#8217;s nice to know that we can help solve the issue by changing a few parameters on the universe side.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2010/02/26/want-to-crash-teradata-give-it-some-lov/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>ASUG Volunteer Summit</title>
		<link>http://www.dagira.com/2010/01/27/asug-volunteer-summit/</link>
		<comments>http://www.dagira.com/2010/01/27/asug-volunteer-summit/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 05:13:14 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[GBN]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=239</guid>
		<description><![CDATA[I spent last Sunday and Monday in Atlanta. I didn&#8217;t see much of the city as I was holed up in a downtown hotel with 250 of my closest friends   working on plans for ASUG&#8217;s coming year. There were a number of interesting things that came out of the meeting. I already posted [...]]]></description>
			<content:encoded><![CDATA[<p>I spent last Sunday and Monday in Atlanta. I didn&#8217;t see much of the city as I was holed up in a downtown hotel with 250 of my closest friends <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  working on plans for ASUG&#8217;s coming year. There were a number of interesting things that came out of the meeting. I already posted about the <a href="http://www.dagira.com/2010/01/24/fall-2010-business-objects-dates-and-location-announced/">location and dates for the fall conference</a>. There are a few other tidbits that I wanted to share as well. In no particular order&#8230; <span id="more-239"></span></p>
<p>The ASUG board of directors announced that they intend to open a new seat dedicated to a Business Objects customer. This board position is intended to be filled by a customer that is not running any SAP enterprise products but has heavily invested in Business Objects technology. If you are a dedicated Business Objects customer and have a high-level executive that would be interested in sharing your viewpoint with the rest of the board and ensuring that your voice is heard then ASUG wants to hear from you.</p>
<p>I am no longer a member of the GBN steering committee. I didn&#8217;t get fired <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  there just isn&#8217;t a need for that group anymore. However, ASUG has asked each of the steering committee members to stay on in a new role: I am now a Global Ambassador for Business Objects within ASUG. Or something like that. There were some details about the new ambassador program released at the planning meeting, but I expect that a more formal press release might be coming out at some point once the program has more details. In an interesting twist the global ambassadors (former steering committee members) have also been granted SAP Mentor status, which I already had. I certainly feel that&#8217;s a positive step because in my experience the Mentor program has remained primarily focused on the SAP enterprise products. The amount of content related to &#8220;classic&#8221; Business Objects products and services has been in the minority.</p>
<p>There were several activities going on in parallel during the summit. One group was focused on finalizing the selections for the spring ASUG conference which is co-located with SAPPHIRE in Orlando. Another group was working on plans for year-round content such as webinars. There were discussions about the influence councils. <em>(I asked about the results from the Web Intelligence influence council from last year and was told it was essentially done and was being reviewed by the legal department. Hopefully we&#8217;ll see something soon.)</em> I am assuming that a next step will be to request abstracts for the fall conference and repeat the planning process for that event.</p>
<p>I did a bit of work tonight on BOB to remove the GBN logo from the user profile screen. It has been replaced by an ASUG profile icon instead. I also swapped out the GBN logo from the sidebar of my blog and replaced it with the ASUG logo and a link to the organization home page. This will be my last blog post that gets the &#8220;GBN&#8221; tag as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2010/01/27/asug-volunteer-summit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fall 2010 Business Objects Dates and Location Announced</title>
		<link>http://www.dagira.com/2010/01/24/fall-2010-business-objects-dates-and-location-announced/</link>
		<comments>http://www.dagira.com/2010/01/24/fall-2010-business-objects-dates-and-location-announced/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 14:17:09 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=238</guid>
		<description><![CDATA[I&#8217;m in Atlanta for the 2010 volunteer summit meeting for ASUG. One of the early announcements was the location and dates for the 2010 fall Business Objects conference. It will run from October 4 &#8211; 7 and will be hosted at the Dolphin Resort (near Walt Disney World) in Orlando, Florida.
Save the date.  
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in Atlanta for the 2010 volunteer summit meeting for ASUG. One of the early announcements was the location and dates for the 2010 fall Business Objects conference. It will run from October 4 &#8211; 7 and will be hosted at the Dolphin Resort (near Walt Disney World) in Orlando, Florida.</p>
<p>Save the date. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2010/01/24/fall-2010-business-objects-dates-and-location-announced/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Behind On Comments&#8230;</title>
		<link>http://www.dagira.com/2010/01/22/behind-on-comments/</link>
		<comments>http://www.dagira.com/2010/01/22/behind-on-comments/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 15:12:55 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=237</guid>
		<description><![CDATA[Hi, folks, just wanted to let everyone know that I realize there are a number of comments or questions that have been piling up without responses. I&#8217;m a bit busy with work and preparing for the ASUG volunteer summit being held this weekend. I will catch up on comments and have some news about the [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, folks, just wanted to let everyone know that I realize there are a number of comments or questions that have been piling up without responses. I&#8217;m a bit busy with work and preparing for the ASUG volunteer summit being held this weekend. I will catch up on comments and have some news about the GBN merger into ASUG and I hope some news about the fall Business Objects conference after this weekend.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2010/01/22/behind-on-comments/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Calculation Context Part I: Overview</title>
		<link>http://www.dagira.com/2010/01/04/calculation-context-part-i-overview/</link>
		<comments>http://www.dagira.com/2010/01/04/calculation-context-part-i-overview/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 23:28:10 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[Calculation Context]]></category>
		<category><![CDATA[Report Techniques]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=229</guid>
		<description><![CDATA[One of the hardest concepts to explain when introducing new folks to Business Objects is context. 
I now imagine blog readers who have been working with the tools for a while have started nodding their heads in agreement, only to stop and say, &#8220;Hey, wait a second, is Dave talking about universe contexts or report [...]]]></description>
			<content:encoded><![CDATA[<p>One of the hardest concepts to explain when introducing new folks to Business Objects is context. </p>
<p><em>I now imagine blog readers who have been working with the tools for a while have started nodding their heads in agreement, only to stop and say, &#8220;Hey, wait a second, is Dave talking about universe contexts or report calculation contexts?&#8221; </em></p>
<p>And the answer is, of course, yes. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_lol.gif' alt=':lol:' class='wp-smiley' /> </p>
<p>Both concepts can be quite complicated and take a while to fully understand. Since I have already written a number of blog posts about universe contexts I thought it was time to turn my attention to the report technique of calculation contexts. Note that this concept is used in Desktop Intelligence and Web Intelligence but not in Crystal. This post is intended to be an overview only. I have plans for a detailed post on each of the various context operators where I will go into much more depth. For this post my goal is to introduce the concept and provide some basic definitions. <span id="more-229"></span></p>
<h3>Introducing Calculation Context</h3>
<p>The default calculation context is defined by the dimensions that participate in a report block. It is this feature that makes the dynamic nature of measures possible. When dimensions are removed from or added to a block the context changes and the measure amounts also change. This is controlled by the <a href="http://www.dagira.com/2009/07/06/sql-aggregate-versus-universe-projection/">projection function set on each measure</a> by the universe designer.</p>
<p>However, a report writer sometimes wants a measure to be fixed at a particular value. Percentages are a really simple example. To calculate a contribution percentage I need to divide each individual value by the overall grand total. In order to do that, I need to know how to generate the grand total anywhere I want it. In order to do <strong>that</strong>, I need to understand how to use the various calculation context operators.</p>
<h3>Context Operators</h3>
<p>There is a simple (but powerful) set of context operators that I can choose from. I intend to briefly define each one in this blog post and then dive into more detail in future posts. As I mentioned when I started, the default context for a measure is based on the dimension values present in the block structure. I can alter which of those dimensions impact the calculation using one of the following three context operators.</p>
<ul>
<li><strong>In</strong> is used to specify exactly which dimensions to include in a context. Other dimensions in the block are ignored. Adding / removing elements from the block does not impact this calculation unless a removed dimension was specified in the context. In that case a #MULTIVALUE error is displayed.</li>
<li><strong>ForEach</strong> is used to make <em>include</em> a dimension in a context. The calculation context is still affected by other values in the block.</li>
<li><strong>ForAll</strong> is used to <em>exclude</em> a dimension from a context. Other dimensions of the block will still be considered. Adding or removing values from a block might change the value, but it will always ignore the ForAll items.</li>
</ul>
<p>The operators listed above all require one or more dimensions as part of their syntax. However, calculation context can be specified by more than a set of dimension values. There are a series of report structure keywords that can be used as well.</p>
<ul>
<li><strong>In Report</strong> sets the context at the report or &#8220;grand total&#8221; level. Any formula with these keywords for the context will return an overall total. Note that the total may still be affected by report filters.</li>
<li><strong>In Block</strong> sets the context for each <del datetime="2009-12-04T22:01:55+00:00">block</del> section. For years I have been waiting for this setting to be renamed to reflect how it really works, but it hasn&#8217;t. I suppose it&#8217;s for backwards compatibility. If there is only one block on a report then &#8220;In Block&#8221; and &#8220;In Report&#8221; are going to be the same. But when a block is broken up into sections, then this context will generate a total for each section value. For that reason I submit that a better name might have been &#8220;In Section&#8221; instead, but as long as I know what it does the specific word does not really matter.</li>
<li><strong>In Body</strong> is the standard default context for each row of data. </li>
</ul>
<p>With Desktop Intelligence we have the option of <strong>In CurrentPage</strong> which can be quite useful and unfortunately not yet available in Web Intelligence. I probably don&#8217;t have to explain how the &#8220;CurrentPage&#8221; total is derived. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Finally, these keywords can appear in several places in a formula. The most common are the &#8220;input&#8221; and &#8220;output&#8221; context settings, but certain functions (like <code>RunningSum()</code> for example) also have a &#8220;reset&#8221; context. </p>
<ul>
<li><strong>Input</strong> context is used to determine the input values for the formula.</li>
<li><strong>Output</strong> context is used to determine the output scope of the formula.</li>
<li><strong>Reset</strong> context is used to determine when a running function starts over at zero.</li>
</ul>
<p>Dimensions referenced in the input context do not have to appear in the block. Output and reset dimensions must appear in the block in order to function correctly. For many calculations the default input context works just fine. I will show an example where it&#8217;s crucial to understand input context later on. For now I would like to move on to a simple example.</p>
<h3>Simple Calculation Context Example</h3>
<p>It&#8217;s hard to fully grasp some of the subtleties of calculation context without good examples. For this post I will provide one simple but common example that I mentioned earlier: contribution percent. I will start with a simple block with one dimension (resort), one measure (revenue), and a grand total as shown here.</p>
<p><img src="/tips/calc_context_intro/simple_block.jpg" width="217" height="121" border="0" alt="simple report block" title="Web Intelligence simple report block with grand total" /></p>
<p>This block already has a total on it. If this were a typical spreadsheet I could reference the total value using a row/column address, but that doesn&#8217;t work in Web Intelligence. That means I have to use another technique to generate the grand total. I mentioned the solution earlier&#8230; all I have to do is create a simple formula that looks like this:</p>
<p><img src="/tips/calc_context_intro/formula.jpg" width="511" height="265" border="0" alt="calculation context formula" title="Web Intelligence variable editor with simple calculation context formula" /></p>
<p>Here&#8217;s the formula again:</p>
<p><code>=[Revenue] / [Revenue] In Report</code></p>
<p>Remember that the <strong>In Report</strong> context projects the measure up to the overall report total. By using that calculation context operator in the denominator of my division I ensure that I will always be dividing by the grand total in this formula. The results?</p>
<p><img src="/tips/calc_context_intro/finished_block.jpg" width="325" height="121" border="0" alt="Finished report block" title="Web Intelligence report with context for percent contribution calculation" /></p>
<h3>What&#8217;s Next?</h3>
<p>This post barely scratched the surface of the calculation context question. It provided a few brief definitions and one simple example. I have several other posts planned that will dive into much greater detail about this often confusing subject. First I plan to talk more about In versus ForEach versus ForAll and how they are different. Next I plan to cover input versus output context and when each should be used. As I write this post neither of those two are much more than an outline for now, so I don&#8217;t have an estimated publish date.</p>
<p>But they&#8217;ll get published. Eventually. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2010/01/04/calculation-context-part-i-overview/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Happy Holidays</title>
		<link>http://www.dagira.com/2009/12/25/happy-holidays/</link>
		<comments>http://www.dagira.com/2009/12/25/happy-holidays/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 00:41:28 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=232</guid>
		<description><![CDATA[
It has been an interesting year. I got to attend more conferences this year than any other year before. I left one company and joined another. The GBN grew and then ultimately merged into ASUG. BOB grows ever closer to the next milestone (600,000 posts and 50,000 users). My BI blog (this site) has been [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/dagira_santa.gif" class="right" border="0" /><br />
It has been an interesting year. I got to attend more conferences this year than any other year before. I left one company and joined another. The GBN grew and then ultimately merged into ASUG. BOB grows ever closer to the next milestone (600,000 posts and 50,000 users). My BI blog (this site) has been running for eighteen months now, which some say is the average lifespan of a personal site or blog.</p>
<p>I&#8217;m not done yet. I&#8217;m done for this year, but I&#8217;ll see you again shortly. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
<p>Best wishes to you and yours during this holiday season.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2009/12/25/happy-holidays/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Foodmart 2000 Universe Review &#8211; Part I: Introduction</title>
		<link>http://www.dagira.com/2009/12/23/foodmart-2000-universe-review-part-i-introduction/</link>
		<comments>http://www.dagira.com/2009/12/23/foodmart-2000-universe-review-part-i-introduction/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 18:54:23 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[Foodmart]]></category>
		<category><![CDATA[Universe Design]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=207</guid>
		<description><![CDATA[Earlier this year I attended SAP TechEd 2009. Many of their sessions were lecture only, but they also provided a number of two or four-hour hands-on sessions. I selected one specific session in order to learn about improvements in the process used to build universes against SAP data sources like BEx queries. But of course [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this year I attended SAP TechEd 2009. Many of their sessions were lecture only, but they also provided a number of two or four-hour hands-on sessions. I selected one specific session in order to learn about improvements in the process used to build universes against SAP data sources like BEx queries. But of course I could not leave it at that. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I got to the session a bit early and started poking around on the laptop to see if I could get some hints as to what we were going to cover. While poking around I found a universe named &#8220;Foodmart&#8221; so I opened it. It was&#8230; interesting.<span id="more-207"></span></p>
<p>Regular blog readers might remember I had posted something about a <a href="http://www.dagira.com/2009/08/01/news-post-introducing-the-dagira-group/">&#8220;universe review service&#8221;</a> that I was thinking of offering. I have not posted anything further about that service, mainly because I <a href="http://www.dagira.com/2009/09/08/news-post-september-2009/">got a real job instead</a>. But since this universe is a new one (at least it was new to me, I had not seen it used in training sessions or demonstrations before) and since it has a number of interesting mistakes, I decided to go ahead and talk about that process. I will use this universe as my subject and along the way talk about various things that I make sure to cover during a universe review. I got permission to take a copy of the universe from the session laptop and placed it on the memory stick that they had provided with all of the session presentations. (That was handy.) Unfortunately the connection was pointing to a Microsoft SQL Server database so I could hardly grab a copy of that.</p>
<p>Later on I asked around to see if anyone knew what the Foodmart universe was used for. One of the responses I got back included a link to another blog where they had a Microsoft Access database that matched the structure from the universe perfectly. After downloading (and testing) that file I now have a copy of the universe and the matching database. I can work with that. </p>
<p>After further investigation it seems that the Foodmart database is yet another demonstration database, much like the Northwind or Summit Sporting Goods or (dare I say it) Island Resorts Marketing. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  There should not be any license issues with distributing or using this database.</p>
<p>Since I expect that this universe will be new to most folks I decided to use it for this series of posts detailing the process I go through to review a universe. I am going to start the more detailed blog posts next year but figured that I would go ahead and post the universe and the associated database for folks to be able to download now. Download links are at the end of the post.</p>
<h3>And Now, The Rules</h3>
<p>I really hope that this series of posts will be useful. In order to provide the most effective use of these materials, I have a few ground rules.</p>
<ul>
<li><strong>No spoilers in comments please</strong><br />
I expect that many blog readers who download the universe and start looking for mistakes are going to find some. I found many in less than five minutes, and I expect no less from some of you. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Please don&#8217;t spoil the process by posting comments about additional mistakes that I have not covered yet. I have a specific order that I want to cover things in and spoilers will, well, they&#8217;ll spoil the process.</li>
<li><strong>Please keep questions on topic</strong><br />
This is a standard request that I make for all blog posts but I wanted to repeat it here.</li>
<li><strong>Don&#8217;t ask if you can send me your universe</strong><br />
Unfortunately I cannot review your universe for you for free (or for a fee) right now. I simply do not have the time to perform this service at the moment.</li>
</ul>
<p>That&#8217;s it. I hope this will prove to be a valuable series of posts for both new and experienced designers, and these few requests will help that happen.</p>
<p>You can follow all of the posts related to the Foodmart universe review using the <a href="http://www.dagira.com/category/design/foodmart/">&#8220;foodmart&#8221;</a> cateogry tag.</p>
<h3>Download Links</h3>
<p>Here are the links to download the database and universe. This universe was created in non-secured mode which means anyone should be able to open it. You do not even have to have a CMS running in order to use this universe; you should be able to switch to <strong>Standalone (no CMS)</strong> mode on the Designer login screen and still be able to use this resource. The database is in Microsoft Access format and is over 20MB when unzipped.</p>
<ul>
<li><a href="/tips/foodmart_download/foodmart_2000.zip">Microsoft Access Database (zipped &#8211; 8.37MB)</a></li>
<li><a href="/tips/foodmart_download/foodmart.zip">Business Objects Foodmart Universe (zipped &#8211; 37KB)</a></li>
</ul>
<p>I am not going to cover how to set up the database and connection. I don&#8217;t want to sound rude but if you don&#8217;t already know how to do these basic steps then the discussions that follow this one are going to be way over your head. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This will be my final blog post for 2009. Happy holidays, and I will see you next year. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2009/12/23/foodmart-2000-universe-review-part-i-introduction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Time Sliced Measures Part III: Making Measures</title>
		<link>http://www.dagira.com/2009/12/17/time-sliced-measures-part-iii-making-measures/</link>
		<comments>http://www.dagira.com/2009/12/17/time-sliced-measures-part-iii-making-measures/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 03:52:29 +0000</pubDate>
		<dc:creator>Dave Rathbun</dc:creator>
				<category><![CDATA[2008 GBN - Dallas]]></category>
		<category><![CDATA[Universe Contexts]]></category>
		<category><![CDATA[Universe Design]]></category>

		<guid isPermaLink="false">http://www.dagira.com/?p=187</guid>
		<description><![CDATA[In the first post in this series I defined what time-sliced measures are and why they can be useful in a universe. In the second post I described a special calendar table that was designed and built to support the requirements for this solution. I also showed how the join logic worked in conjunction with [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://www.dagira.com/2009/08/08/time-sliced-measures-part-i-defining-the-problem/">first post in this series</a> I defined what time-sliced measures are and why they can be useful in a universe. In the <a href="http://www.dagira.com/2009/08/28/time-sliced-measures-part-ii-time-slice-calendar-table/">second post</a> I described a special calendar table that was designed and built to support the requirements for this solution. I also showed how the join logic worked in conjunction with the table design. This post completes the implementation. I am finally going to work on the measure objects that a user will see. </p>
<p>In any universe design project I strive for the following goals:</p>
<ul>
<li><strong>Deliver the correct result</strong><br />
In my opinion, this is always the number one goal in any universe design.</li>
<li><strong>User friendly</strong><br />
This is quite important but secondary to correctness</li>
<li><strong>Easy to maintain</strong><br />
Universe maintenance is always allowed to suffer in order to provide the first two attributes on this list, but it is a worthwhile goal to strive for nonetheless</li>
</ul>
<p>In this post I will show how all three of these goals are ultimately met by this implementation. When I am done I will have a completed universe. <em>This post will cover slides 26 through 30 from my 2008 GBN Conference presentation. There is a link to download the file at the end of this post.</em> <span id="more-187"></span></p>
<h3>A Brief Recap</h3>
<p>The overall goals of this project were listed in the prior posts in this series. The most important ones for this post are:</p>
<ul>
<li>Each report is expected to have multiple time-sliced measures</li>
<li>The process of splitting each time-slice time period into its own SQL statement should be completely transparent</li>
</ul>
<p>Current Year and Prior Year are different time slice attributes. Every report is expected to have month-to-date and year-to-date measures that cover both the current and the prior year. That means I expect to see four different measures used in each document. The month and year date ranges are obviously different, as are the current and prior year ranges. In the last post on this topic I described a special time-slice calendar table and set up different aliases for each required time-slice. I set up contexts to keep queries from hitting more than one time-slice at the same time.</p>
<p>That&#8217;s how we got here. Where to next? It&#8217;s time to build some measures.</p>
<h3>Bits and Pieces</h3>
<p>I subscribe to the thought that anything that makes the universe designer&#8217;s job easier while making the user&#8217;s life harder is the wrong approach. However, if I can do something to make my life easier without impacting the user, then whatever I come up with is fair game. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  That&#8217;s how I arrived at the strategy that I am going to outline next.</p>
<p>Normally a &#8220;bit&#8221; is either a one or a zero. Many of the bit objects used in this solution will be just that. However, I am also going to create some special measure bits that make use of the @Select() function. As a general rule I am not in favor of using this function, but in this case I will and I will justify why in a bit. (heh, pun <img src='http://www.dagira.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  )</p>
<p>I am going to focus on creating time-sliced objects for the revenue object. In order to do this, I am going to create a measure bit called &#8220;Revenue&#8221; that contains only the table / columns required to calculate this value. I am <strong>not going to include an aggregation function for this measure</strong> which violates another one of my universe design rules. Again, I will justify why. The other bit objects will be used to select (or mark) which context is used for each time slice.</p>
<h3>Using Measure Bits</h3>
<p>In my time-sliced solution everything is made up of combinations. Imagine a cartesian product between measures and time periods, something like this:</p>
<p><img src="/tips/time_slice_part_iii/cartesian_measures.jpg" /></p>
<p>Each time-slice on the left is combined with each measure on the right. Rather than create six different references to the revenue formula shown here&#8230;</p>
<p><code>INVOICE_LINE.DAYS * INVOICE_LINE.NB_GUESTS * SERVICE.PRICE</code></p>
<p>&#8230;I am going to create just one. Notice that the code shown above does not have an aggregate function? This is by design&#8230; I am going to use the @Select() function to build my visible measure objects. Here&#8217;s the initial part of the object definition for the CY MTD Revenue object.</p>
<p><code>sum(@Select(Measure Bits\Revenue))</code></p>
<p>By leaving the aggregate function out of the source measure I can also create a minimum, maximum, or other aggregate version of the sales revenue. This is because the code referenced by the @Select() doesn&#8217;t have an aggregate&#8230; and why is this important? Because I <strong>can&#8217;t nest aggregate functions</strong>. If my source measure included the sum() function then that&#8217;s all I can do with it. By keeping it generic (no aggregate) I can reuse it with any aggregate function as needed. So that&#8217;s why I am breaking the rule that says every measure must have an aggregate function.</p>
<p>Ultimately the measure bits are going to be hidden from view so they will never be viewable / usable by report writers. They are only used as building blocks in the Designer application.</p>
<h3>Time Slice Bits</h3>
<p>Now I need to build some time-sliced bits. These are really simple. Here&#8217;s what the object definition looks like for the CY MTD bit object.</p>
<p><img src="/tips/time_slice_part_iii/time_bit_definition.jpg" /></p>
<p>The select clause contains the number 1 and that&#8217;s it. Notice what the help text says? In big CAPITAL letters it says &#8220;DON&#8217;T FORGET THE TABLE!!!&#8221; I wonder what that means? <img src='http://www.dagira.com/wp-includes/images/smilies/icon_lol.gif' alt=':lol:' class='wp-smiley' /> </p>
<p>Here&#8217;s what it means. The 1 is just a placeholder to put something in the Select clause. The Where clause is empty. The From clause comes from the table list, and here&#8217;s what that looks like.</p>
<p><img src="/tips/time_slice_part_iii/table_reference.jpg" /></p>
<p>Stick with me just a little bit longer and this will all make sense. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Remember that in the earlier posts I set up aliases for my time-slice calendar table. Each alias became part of its own context. A context is a series of joins that make up a particular path through a universe. What I am working towards is a set of time-sliced objects that a user can drag onto their query panel without having to worry about where they come from or how they&#8217;re put together. Here&#8217;s what my schema looks like as a reminder. All of the aliases are on the right side.</p>
<p><img src="/tips/time_slice_part_iii/schema.jpg" /></p>
<p>This structure gives me a way to automatically split out each time-sliced measure into its own path so that a user can combine CY MTD and PY MTD and any of the other options onto one query and run it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dagira.com/2009/12/17/time-sliced-measures-part-iii-making-measures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
