<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
	<title>Comments on: Do I Have a Fan Trap?</title>
	<atom:link href="http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/</link>
	<description>...you are in a twisty maze of passageways, all different...</description>
	<lastBuildDate>Tue, 07 Feb 2012 17:17:49 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave Rathbun</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-1323</link>
		<dc:creator>Dave Rathbun</dc:creator>
		<pubDate>Wed, 11 Aug 2010 18:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-1323</guid>
		<description>You have hit on the main problem with the alias + context solution for fan traps; condition propagation. I have been working on a blog post with some ideas but it&#039;s nowhere near ready for publication yet. However, your description doesn&#039;t fit what I would expect to see. Conditions at the distribution level should roll up find to the header level. It&#039;s conditions as the header level that don&#039;t roll down to the distribution level that&#039;s typically the problem.</description>
		<content:encoded><![CDATA[<p>You have hit on the main problem with the alias + context solution for fan traps; condition propagation. I have been working on a blog post with some ideas but it&#8217;s nowhere near ready for publication yet. However, your description doesn&#8217;t fit what I would expect to see. Conditions at the distribution level should roll up find to the header level. It&#8217;s conditions as the header level that don&#8217;t roll down to the distribution level that&#8217;s typically the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerry Green</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-1320</link>
		<dc:creator>Kerry Green</dc:creator>
		<pubDate>Tue, 10 Aug 2010 19:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-1320</guid>
		<description>I have a fan trap using PO header, PO lines and PO distributions which has been resolved using alias tables.  The problem I am having is applying conditions at the PO distribution level.  Since BO is creating multiple queries for header and distribution data,  the condition on distribution will not be applied to the header query.  I have read about using predefined conditions in a derived table, but this is not an option due to too many dimensions which required for filtering.  Wondering if there is another solution I have missed.  Thanks!</description>
		<content:encoded><![CDATA[<p>I have a fan trap using PO header, PO lines and PO distributions which has been resolved using alias tables.  The problem I am having is applying conditions at the PO distribution level.  Since BO is creating multiple queries for header and distribution data,  the condition on distribution will not be applied to the header query.  I have read about using predefined conditions in a derived table, but this is not an option due to too many dimensions which required for filtering.  Wondering if there is another solution I have missed.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Rathbun</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-1132</link>
		<dc:creator>Dave Rathbun</dc:creator>
		<pubDate>Fri, 07 May 2010 19:27:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-1132</guid>
		<description>If you only have one fact table you do not have a fan trap. Your challenge is that you don&#039;t have a clean hierarchy, so your week-date relationship might need to be in one context and your year-quarter-month-date relationships might need to be in another. You also can&#039;t really use @Aggregate_Aware() in this situation because your tables are not a hierarchy...</description>
		<content:encoded><![CDATA[<p>If you only have one fact table you do not have a fan trap. Your challenge is that you don&#8217;t have a clean hierarchy, so your week-date relationship might need to be in one context and your year-quarter-month-date relationships might need to be in another. You also can&#8217;t really use @Aggregate_Aware() in this situation because your tables are not a hierarchy&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thlZ</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-1131</link>
		<dc:creator>thlZ</dc:creator>
		<pubDate>Fri, 07 May 2010 11:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-1131</guid>
		<description>My scenario is that my fact is at the week level.
My time dimension is a star schema(Calender table).month to week is many to many..so i broke up the table into snowflake...
My time dimension is Year-&lt;Quarter-&lt;Month-&lt;date  and week-&lt;date seperately.

If i want to c my data in the fact at quarter level it shd agg. accordingly.... but it is not happening..
How shd my context be....</description>
		<content:encoded><![CDATA[<p>My scenario is that my fact is at the week level.<br />
My time dimension is a star schema(Calender table).month to week is many to many..so i broke up the table into snowflake&#8230;<br />
My time dimension is Year-&lt;Quarter-&lt;Month-&lt;date  and week-&lt;date seperately.</p>
<p>If i want to c my data in the fact at quarter level it shd agg. accordingly&#8230;. but it is not happening..<br />
How shd my context be&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shiva</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-696</link>
		<dc:creator>Shiva</dc:creator>
		<pubDate>Mon, 24 Aug 2009 13:03:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-696</guid>
		<description>Thankyou very much for the Reply.

Best Regards,
Shiva</description>
		<content:encoded><![CDATA[<p>Thankyou very much for the Reply.</p>
<p>Best Regards,<br />
Shiva</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Rathbun</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-694</link>
		<dc:creator>Dave Rathbun</dc:creator>
		<pubDate>Mon, 24 Aug 2009 12:42:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-694</guid>
		<description>Unless you have measures from your bridge table you have no fan traps.</description>
		<content:encoded><![CDATA[<p>Unless you have measures from your bridge table you have no fan traps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shiva</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-691</link>
		<dc:creator>Shiva</dc:creator>
		<pubDate>Mon, 24 Aug 2009 05:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-691</guid>
		<description>Thanks for the quick response Dave.

Yeah i got it. Thankyou very much for the explaination. One more point if you could please explain the second question of my post ..... I&#039;ll be grateful to you. :)

Regards,
Shiva</description>
		<content:encoded><![CDATA[<p>Thanks for the quick response Dave.</p>
<p>Yeah i got it. Thankyou very much for the explaination. One more point if you could please explain the second question of my post &#8230;.. I&#8217;ll be grateful to you. <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Regards,<br />
Shiva</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Rathbun</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-690</link>
		<dc:creator>Dave Rathbun</dc:creator>
		<pubDate>Sun, 23 Aug 2009 03:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-690</guid>
		<description>Tamir, if you are talking about the example in my post, it would not be solved by an average projection since the data would be wrong coming from the database.

Shiva, the &quot;multiple&quot; is not the quanty of items but rather the count of rows in the items table. If there is one line per header everything is fine. If there are two lines for a specific order, then the budget number for that order will be doubled (multiply by 2). If there are three lines for a given order then the budget for &lt;strong&gt;that&lt;/strong&gt; order will be tripled, and so on. It has nothing to do with the number (quantity) of items ordered on each line. I hope that clears it up.</description>
		<content:encoded><![CDATA[<p>Tamir, if you are talking about the example in my post, it would not be solved by an average projection since the data would be wrong coming from the database.</p>
<p>Shiva, the &#8220;multiple&#8221; is not the quanty of items but rather the count of rows in the items table. If there is one line per header everything is fine. If there are two lines for a specific order, then the budget number for that order will be doubled (multiply by 2). If there are three lines for a given order then the budget for <strong>that</strong> order will be tripled, and so on. It has nothing to do with the number (quantity) of items ordered on each line. I hope that clears it up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tamir Bar-Netzer</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-689</link>
		<dc:creator>Tamir Bar-Netzer</dc:creator>
		<pubDate>Sat, 22 Aug 2009 22:07:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-689</guid>
		<description>Hi,

One of the best ways of solving the example listed above would use Average projection on &#039;Total Order Budget&#039;. This is provided that users normally retreive data and not fool around with it (e.g., slice and dice)

Cheers,

         Tamir</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>One of the best ways of solving the example listed above would use Average projection on &#8216;Total Order Budget&#8217;. This is provided that users normally retreive data and not fool around with it (e.g., slice and dice)</p>
<p>Cheers,</p>
<p>         Tamir</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shiva</title>
		<link>http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/comment-page-1/#comment-687</link>
		<dc:creator>Shiva</dc:creator>
		<pubDate>Fri, 21 Aug 2009 12:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagira.com/2008/03/03/do-i-have-a-fan-trap/#comment-687</guid>
		<description>Hey Dave i&#039;ve a couple of questions for you.
&lt;blockquote cite=&quot;&quot;&gt;
1. I&#039;m not clear with the following part.
By Dave:
select orders.order_id
, sum(orders.order_budget)
, sum(order_lines.order_qty)
from orders
, order_lines
where orders.order_id = order_lines.order_id
group by orders.order_id

The issue is that the line item total (sum) is correct, but the header total budget (also a sum) is way too high. If you look back at the raw data shown earlier, you might notice that the budget amount has been multiplied by the number of line items in the second table.
&lt;/blockquote&gt;

I tried a similar query in my database it gave me the same answer. now when you are summing the total order qty and total order budget and grouping it,.... it is taking the total qty sold =65 and total budget =2000 for order 1 which i feel is correct..... had it got multiplied then it should have been 32500 under &quot;total order budget&quot; column.

Assuming you have a budget of 500 for each.... 10 pair of shoes, 10 t-shirts, 20 plastic combs and 25 pencils. So that makes your total budget to 2000 for all the item.....

I hope my question is clear. 

2. If my datamodel has m:m cardinality between the fact and dimension table... and i happen to use the Bridge table(DW concept) then i get a fan trap as per your first statement which is correct. 
Now to resolve this i think i can use context or alias. (please confirm) If yes.. IF i have to choose one among the two (alias /context) which one whould i choose in this scenario... As i feel having alias will increase thenumber of joins in my Universe schema structure.. (the more number of joins the slow may be the performance ...) So is it better to use context here or there is any other way to it.

Thanks for the patience in reading it :) 
Cheers,
Shiva</description>
		<content:encoded><![CDATA[<p>Hey Dave i&#8217;ve a couple of questions for you.</p>
<blockquote cite=""><p>
1. I&#8217;m not clear with the following part.<br />
By Dave:<br />
select orders.order_id<br />
, sum(orders.order_budget)<br />
, sum(order_lines.order_qty)<br />
from orders<br />
, order_lines<br />
where orders.order_id = order_lines.order_id<br />
group by orders.order_id</p>
<p>The issue is that the line item total (sum) is correct, but the header total budget (also a sum) is way too high. If you look back at the raw data shown earlier, you might notice that the budget amount has been multiplied by the number of line items in the second table.
</p></blockquote>
<p>I tried a similar query in my database it gave me the same answer. now when you are summing the total order qty and total order budget and grouping it,&#8230;. it is taking the total qty sold =65 and total budget =2000 for order 1 which i feel is correct&#8230;.. had it got multiplied then it should have been 32500 under &#8220;total order budget&#8221; column.</p>
<p>Assuming you have a budget of 500 for each&#8230;. 10 pair of shoes, 10 t-shirts, 20 plastic combs and 25 pencils. So that makes your total budget to 2000 for all the item&#8230;..</p>
<p>I hope my question is clear. </p>
<p>2. If my datamodel has m:m cardinality between the fact and dimension table&#8230; and i happen to use the Bridge table(DW concept) then i get a fan trap as per your first statement which is correct.<br />
Now to resolve this i think i can use context or alias. (please confirm) If yes.. IF i have to choose one among the two (alias /context) which one whould i choose in this scenario&#8230; As i feel having alias will increase thenumber of joins in my Universe schema structure.. (the more number of joins the slow may be the performance &#8230;) So is it better to use context here or there is any other way to it.</p>
<p>Thanks for the patience in reading it <img src='http://www.dagira.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Cheers,<br />
Shiva</p>
]]></content:encoded>
	</item>
</channel>
</rss>

