<?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>Pharma BI &#187; Case Studies</title>
	<atom:link href="http://pharma-bi.com/category/case-studies/feed/" rel="self" type="application/rss+xml" />
	<link>http://pharma-bi.com</link>
	<description>Business Intelligence Blog</description>
	<lastBuildDate>Thu, 15 Dec 2011 05:52:22 +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>Fiscal Period Calculations in Tableau</title>
		<link>http://pharma-bi.com/2011/04/fiscal-period-calculations-in-tableau-2/</link>
		<comments>http://pharma-bi.com/2011/04/fiscal-period-calculations-in-tableau-2/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 23:45:03 +0000</pubDate>
		<dc:creator>Christine Muser</dc:creator>
				<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Case Studies]]></category>
		<category><![CDATA[Dashboards & Scorecards]]></category>
		<category><![CDATA[Tableau]]></category>

		<guid isPermaLink="false">http://pharma-bi.com/?p=752</guid>
		<description><![CDATA[<p>For the most part it’s fairly easy to calculate fiscal periods in Tableau. Here is one approach that requires two parameters and two date functions. This approach allows us to create custom Fiscal Periods on the fly – which can be useful for building what-if scenarios or for working with data that trickles in over [...]]]></description>
			<content:encoded><![CDATA[<p>For the most part it’s fairly easy to calculate fiscal periods in Tableau. Here is one approach that requires two parameters and two date functions. This approach allows us to create custom Fiscal Periods on the fly – which can be useful for building what-if scenarios or for working with data that trickles in over a long period of time, such as rebates or claims, where we may need to exclude a chunk of the most current data because it’s incomplete.</p>
<p>To get started we need to indicate when the Fiscal Period starts and when it ends, hence the two parameters: [CFY Start] and [CFYTD End]. Then we need to determine which data to include in our calculation. The DATEDIFF and DATEADD functions will come in handy for that.</p>
<p>Let’s assume we want to create a Fiscal Year summary for a measure called [Sales] based on the [Order Date]:</p>
<p>FYTD Sales Current =<br />
IF [Order Date] &lt; [CFY Start] THEN Null<br />
ELSEIF [Order Date] &gt; [CFYTD End] THEN Null<br />
ELSE [Sales]<br />
END</p>
<p>To compare the current fiscal year sales with the same period during the previous year, we need to shift everything back by 12 months using the DATEADD function:</p>
<p>FYTD Sales Previous =<br />
IF [Order Date] &lt; DATEADD(&#8216;month&#8217;,-12,[CFY Start]) THEN Null<br />
ELSEIF [Order Date] &gt; DATEADD(&#8216;month&#8217;,-12,[CFYTD End]) THEN Null<br />
ELSE [Sales]<br />
END</p>
<p>Note: when using the DATEADD function to add or subtract months, we don’t have to worry about leap days – pretty nifty.</p>
<p>A similar approach works for Month to Date calculations. With the DATEDIFF function we get rid of all the data that doesn’t fall into the current month, then we just add up the days we want to include:</p>
<p>FMTD Sales Curent =<br />
IF DATEDIFF(&#8216;month&#8217;,[Order Date],[CFYTD End]) &lt;&gt; 0 THEN NULL<br />
ELSEIF [Order Date] &gt; [CFYTD End] THEN NULL<br />
ELSE [Sales]<br />
END</p>
<p>When comparing to the same month a year ago, we can use the same trick of shifting time as we used for our Year to Date Previous calculation:</p>
<p>FMTD Sales Previous =<br />
IF DATEDIFF(&#8216;month&#8217;,[CFYTD End],[Order Date]) &lt;&gt; -12 THEN NULL<br />
ELSEIF [Order Date] &gt; DATEADD(&#8216;month&#8217;,-12,[CFYTD End]) THEN NULL<br />
ELSE [Sales]<br />
END</p>
<p>Bonus Calculation:</p>
<p>If you need to calculate the number of days in a year, here’s a way that considers Leap Years:</p>
<p>IF (datepart(&#8216;year&#8217;,[Order Date]) % 400) = 0 then 366<br />
ELSEIF (datepart(&#8216;year&#8217;,[Order Date]) % 100) = 0 then 365<br />
ELSEIF (datepart(&#8216;year&#8217;,[Order Date]) % 4) = 0 then 366<br />
ELSE 365<br />
END</p>
<p>The % sign is Tableau’s syntax for modulo calculations.</p>
<p>Enjoy!</p>
<p>Here&#8217;s a workbook with examples:</p>
<p><script src="http://public.tableausoftware.com/javascripts/api/viz_v1.js" type="text/javascript"></script></p>
<p><object class="tableauViz" style="display: none;" width="675" height="523"><param name="host_url" value="http%3A%2F%2Fpublic.tableausoftware.com%2F" /><param name="name" value="YTD_CalculationsPublic/FiscalYear" /><param name="tabs" value="yes" /><param name="toolbar" value="yes" /><param name="animate_transition" value="yes" /><param name="display_static_image" value="yes" /><param name="display_spinner" value="yes" /><param name="display_overlay" value="yes" /></object><noscript>Fiscal Year Example<br />
<a href="#"><img alt="Fiscal Year Example " src="http:&#47;&#47;public.tableausoftware.com&#47;static&#47;images&#47;YT&#47;YTD_Calcula tionsPublic&#47;FiscalYear&#47;1_rss.png" height="100%" /></a></noscript></p>
<div style="width: 675px; height: 22px; padding: 0px 10px 0px 0px; color: black; font: normal 8pt  verdana,helvetica,arial,sans-serif;">
<div style="float: right; padding-right: 8px;"><a href="http://www.tableausoftware.com/public?ref=http://public.tableausoftware.com/views/YTD_C alculationsPublic/FiscalYear" target="_blank">Powered by Tableau</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://pharma-bi.com/2011/04/fiscal-period-calculations-in-tableau-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Volcanoes, Airplanes and Quantifying Risk</title>
		<link>http://pharma-bi.com/2010/04/volcanoes-airplanes-and-quantifying-risk/</link>
		<comments>http://pharma-bi.com/2010/04/volcanoes-airplanes-and-quantifying-risk/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 19:45:18 +0000</pubDate>
		<dc:creator>Christine Muser</dc:creator>
				<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Case Studies]]></category>
		<category><![CDATA[Current Topics]]></category>
		<category><![CDATA[Modelling]]></category>
		<category><![CDATA[Six Sigma]]></category>

		<guid isPermaLink="false">http://pharma-bi.com/?p=636</guid>
		<description><![CDATA[<p>On April 19th, 2010, IATA, the chief trade group representing airlines, issued a press release which states in part: “IATA criticized Europe’s unique methodology of closing airspace based on theoretical modeling of the ash cloud. ‘This means that governments have not taken their responsibility to make clear decisions based on facts …’ said [Giovanni] Bisignani [...]]]></description>
			<content:encoded><![CDATA[<p>On April 19<sup>th</sup>, 2010, <a href="http://en.wikipedia.org/wiki/International_Air_Transport_Association" target="_blank">IATA</a>, the chief trade group representing airlines, issued a <a href="http://www.iata.org/pressroom/pr/Pages/2010-04-19-01.aspx" target="_blank">press release</a> which states in part: “IATA criticized Europe’s unique methodology of closing airspace based on theoretical modeling of the ash cloud. ‘This means that governments have not taken their responsibility to make clear decisions based on facts …’ said [Giovanni] Bisignani [IATA’s Director General and CEO].”</p>
<p>This statement leaves the unfortunate impression that decisions based on theoretical models are somehow suspect and of little value.  The better, but less soundbite-friendly, question should have been whether the model adequately predicts the risk. To make useful predictions, a model needs to do two things:</p>
<ul>
<li>account      for all key factors that influence the outcome</li>
<li>quantify      how each factor influences the outcome.</li>
</ul>
<p>To the frustration of passengers, airlines and businesses around the world, the eruption of the <a href="http://en.wikipedia.org/wiki/Eyjafjallaj%C3%B6kull" target="_blank">Eyjafjallajokull</a> volcano in Iceland presented several challenges for modelers.  Some of the key factors playing a role here include:</p>
<ul>
<li>Ash      composition: how damaging is it?</li>
<li>Extent      of the cloud: how high, how far and where?</li>
<li>Aircraft      capability: how much ash exposure can airplanes handle?</li>
<li>The      costs of staying grounded vs. the costs of catastrophic failure</li>
</ul>
<p>These four bullets of course represent just the tip of the ice berg: each of them summarizes a long list of related factors.  For example, while current data is unavailable, scientists have to rely on past experience when estimating the size and weight of ash particles, their chemical make-up and the density of the ash.  To confound matters, predictions regarding wind speed, direction and turbulence need to be considered as well.</p>
<p>So the real question needs to be: how well does the model represent the current situation? How well do we understand what the actual key factors are?  How well can we measure them?  Are we relying purely on past insight or can we refine our knowledge with data from the current situation?  To what extent can <a href="http://earthobservatory.nasa.gov/NaturalHazards/event.php?id=43253" target="_blank">current satellite images</a>, air samples and meteorological measurements improve our ability to predict the risk to life and well-being of people and property?</p>
<p><a href="http://news.bbc.co.uk/2/hi/uk_news/8625813.stm" target="_blank">This interactive map</a> on the BBC we site shows one example of how output from such modeling looks by mapping the extent of the plume over several days along with normal flight routes across the Atlantic.  This post in Business Week sheds some light on our <a href="http://www.businessweek.com/news/2010-04-22/research-gap-left-airlines-vulnerable-to-volcano-s-fire-and-ice.html" target="_blank">spotty knowledge</a> regarding the real risks of volcanic ash.</p>
<p>The other critical question revolves around acceptable risk.  Risk not only originates from ash clouds. It also comes from “playing it safe.”  Billions of dollars in lost revenues and productivity put the livelihood of hundreds of thousands of people at risk.  Every day we accept the risks of driving our car – so at what point do ash clouds represent a higher risk than driving a car?  Even if we could come up with an exact numeric value for these risks, how does the value of human life fit into these equations?</p>
<p>Therein lies the apparent disconnect between statistical models and real life: intangible values sometimes outweigh what can be measured.  The decisions we make depend on how we actually perceive the risk.  Yet, in order to put our perceptions into perspective, we need to have good numbers to guide us – and getting good numbers requires a good model of reality.</p>
<p>So, before we start talking about law suits, we need to accept that risk is inherent to anything we do.  Blaming people for doing the best they can to balance public safety with economic considerations wastes resources that would be better spent on improving our ability to assess and manage risks.  We send unmanned drones to gather combat intelligence, why not modify them to collect air samples?  Why not fund research to create better models for volcanic plumes? Especially if history should repeat itself and <a href="http://en.wikipedia.org/wiki/Eyjafjallaj%C3%B6kull" target="_blank">Eyjafjallajokull</a> continues to sputter for the next year or two.</p>
<p><strong>Additional Reading</strong></p>
<p><em>From Eruptions</em>, a blog dedicated to volcanism:</p>
<p><strong>Airlines lobby to reopen European airspace closed by Eyjafjallajökull</strong><br />
Posted on: April 18, 2010 2:30 PM, by Erik Klemetti</p>
<p><a href="http://scienceblogs.com/eruptions/2010/04/airlines_lobby_to_reopen_europ.php" target="_blank">http://scienceblogs.com/eruptions/2010/04/airlines_lobby_to_reopen_europ.php</a></p>
<p><strong> </strong></p>
<p><strong>Eyjafjallajökull flight cancellations: How the right decision is being made to look wrong</strong></p>
<p><strong>Posted on: April 22, 2010 9:40 AM, by Erik Klemetti</strong></p>
<p><a href="http://scienceblogs.com/eruptions/2010/04/eyjafjallajokull_flight_cancel.php" target="_blank">http://scienceblogs.com/eruptions/2010/04/eyjafjallajokull_flight_cancel.php</a></p>
<p><strong> </strong></p>
<p><strong>Research Gap Left Airlines Exposed to Volcano’s Blast (Update1)</strong></p>
<p>April 22, 2010, 9:05 AM EDT</p>
<p><a href="http://www.businessweek.com/news/2010-04-22/research-gap-left-airlines-vulnerable-to-volcano-s-fire-and-ice.html" target="_blank">http://www.businessweek.com/news/2010-04-22/research-gap-left-airlines-vulnerable-to-volcano-s-fire-and-ice.html</a></p>
<p><strong>Is driving more dangerous than flying through ash?</strong></p>
<p>Page last updated at 10:51 GMT, Wednesday, 21 April 2010 11:51 UK</p>
<p><a href="http://news.bbc.co.uk/2/hi/uk_news/magazine/8633484.stm" target="_blank">http://news.bbc.co.uk/2/hi/uk_news/magazine/8633484.stm</a></p>
<p><strong>Could aircraft dodge the volcanic ash cloud?</strong></p>
<p>Page last updated at 14:06 GMT, Tuesday, 20 April 2010 15:06 UK</p>
<p>By Stephen Mulvey</p>
<p>BBC News</p>
<p><a href="http://news.bbc.co.uk/2/hi/in_depth/8632583.stm" target="_blank">http://news.bbc.co.uk/2/hi/in_depth/8632583.stm</a></p>
<p><strong>Recriminations erupt in ash-fueled aviation crisis</strong></p>
<p>AP 4/21/2010</p>
<p>By Arthur Max, Associated Press Writer</p>
<p><a href="http://news.yahoo.com/s/ap/eu_iceland_volcano">http://news.yahoo.com/s/ap/eu_iceland_volcano</a></p>
<p><strong>How volcanic ash could ground your next flight</strong></p>
<p>By Larry Dignan | Apr 15, 2010</p>
<p><a href="http://www.smartplanet.com/business/blog/smart-takes/how-volcanic-ash-could-ground-your-next-flight/5989/?tag=content;col1" target="_blank">http://www.smartplanet.com/business/blog/smart-takes/how-volcanic-ash-could-ground-your-next-flight/5989/?tag=content;col1</a></p>
<p><strong>How Volcanic Ash Can Kill An Airplane</strong></p>
<p>Apr 15, 2010 09:00 AM</p>
<p>Ray Wert</p>
<p>Story &amp; pictures of KLM Flight 867</p>
<p><a href="http://jalopnik.com/5517775/how-volcanic-ash-can-kill-an-airplane" target="_self">http://jalopnik.com/5517775/how-volcanic-ash-can-kill-an-airplane</a></p>
<p><strong>Iceland Volcano Vs Mt. St.</strong><strong> Helens And Airspace </strong></p>
<p>Pilot’s discussion forum</p>
<p><a href="http://www.airliners.net/aviation-forums/general_aviation/read.main/4783270/" target="_blank">http://www.airliners.net/aviation-forums/general_aviation/read.main/4783270/</a></p>
<p><strong> </strong></p>
<p><strong>Volcanic Ash Contingency Plan</strong></p>
<p>ICAO (International Civil Aviation Organization)</p>
<p><a href="http://www.paris.icao.int/documents_open/files.php?subcategory_id=63" target="_blank">http://www.paris.icao.int/documents_open/files.php?subcategory_id=63</a></p>
<p><a href="http://www.paris.icao.int/documents_open/show_file.php?id=274" target="_blank">http://www.paris.icao.int/documents_open/show_file.php?id=274</a></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 216px; width: 1px; height: 1px; overflow: hidden;">
<div class="profile-header">
<div id="member-73704305" class="masthead vcard">
<h1 class="n fn"><span class="given-name">MD F.E. Bustillo</span> <span class="family-name">Iii</span> <img title="MD F.E. Bustillo  is a 3rd degree contact" src="http://static02.linkedin.com/img/icon/degree/icon_degree_3_24x24_v2.png" alt="MD F.E. Bustillo is a 3rd degree contact" width="24" height="24" /></h1>
<p class="title">Owner, Kansas City Safety Alliance and Research</p>
<dl class="demographic-info adr">
<dt>Location</dt>
<dd class="locality"> <a title="Find users in this region" name="location" href="http://www.linkedin.com/search?search=&amp;sortCriteria=R&amp;keepFacets=keepFacets&amp;facet_G=us%3A376&amp;goback=%2Emml_inbox_none_DATE_1%2Emid_1983243097">Kansas City, Missouri  Area</a> </dd>
</dl>
</div>
<dl id="overview">
<dt> <a href="http://www.linkedin.com/profile?viewProfile=&amp;key=73704305&amp;invAcpt=17268_I1983243097_2&amp;authToken=Am4m&amp;authType=name&amp;goback=%2Emml_inbox_none_DATE_1%2Emid_1983243097#profile-experience">Current</a> </dt>
<dd>
<ul class="current">
<li> Owner <span class="at">at</span> Kansas City Safety Alliance and Research</li>
</ul>
</dd>
<dt> Connections </dt>
<dd class="overview-connections"><strong>9</strong> connections</p>
</dd>
<dt><a title="View public profile" href="http://www.linkedin.com/pub/md-f-e-bustillo-iii/20/824/b55">Public Profile</a></dt>
<dd class="last"><a title="View public profile" name="webProfileURL" href="http://www.linkedin.com/pub/md-f-e-bustillo-iii/20/824/b55">http://www.linkedin.com/pub/md-f-e-bustillo-iii/20/824/b55</a></p>
</dd>
</dl>
<p><script type="text/javascript">// < ![CDATA[
// < ![CDATA[
// < ![CDATA[
      showHide.init('overview');</p>
<p>// ]]&gt;</script></div>
<div id="profile-applications" class="section  installed-apps"></div>
<div id="profile-experience" class="section">
<div class="header">
<h2>Experience</h2>
</div>
<div class="content">
<div class="position  first">
<div class="postitle">
<h3 class="position-title anet"><span class="title"> <a title="Find users with this title" name="title" href="http://www.linkedin.com/search?search=&amp;sortCriteria=R&amp;keepFacets=keepFacets&amp;title=Owner&amp;currentTitle=co&amp;goback=%2Emml_inbox_none_DATE_1%2Emid_1983243097">Owner</a></span></h3>
<h4><strong> <a title="Find users who have worked at this company" name="company" href="http://www.linkedin.com/search?search=&amp;sortCriteria=R&amp;keepFacets=keepFacets&amp;company=Kansas+City+Safety+Alliance+and+Research&amp;currentCompany=co&amp;goback=%2Emml_inbox_none_DATE_1%2Emid_1983243097">Kansas  City Safety Alliance and Research</a> </strong></h4>
</div>
<p class="orgstats">
<p class="period">Currently holds this position</p>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://pharma-bi.com/2010/04/volcanoes-airplanes-and-quantifying-risk/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why We Need Good Data</title>
		<link>http://pharma-bi.com/2009/12/why-we-need-good-data/</link>
		<comments>http://pharma-bi.com/2009/12/why-we-need-good-data/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 17:54:59 +0000</pubDate>
		<dc:creator>Christine Muser</dc:creator>
				<category><![CDATA[Case Studies]]></category>
		<category><![CDATA[Know Your Data]]></category>
		<category><![CDATA[Modelling]]></category>

		<guid isPermaLink="false">http://pharma-bi.com/?p=497</guid>
		<description><![CDATA[<p>Recently, while working on input for a decision tree, I ran into a scenario that reminded me of the fact that we cannot improve a decision simply by applying a tool or technique. We also need good data.</p>
<p>Here is a hypothetical example: Let us assume we are a contractor who is evaluating a fixed bid [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, while working on input for a <a href="http://en.wikipedia.org/wiki/Decision_tree">decision tree</a>, I ran into a scenario that reminded me of the fact that we cannot improve a decision simply by applying a tool or technique. We also need good data.</p>
<p>Here is a hypothetical example: Let us assume we are a contractor who is evaluating a fixed bid contract.  This contract will pay $115,000 if we accept a clause for liquidated damages of $50,000 in the event we do not meet some project conditions.  We can remove this clause from the contract, but in that case it only pays $100,000.</p>
<p>From past experience we know that our project costs will fall somewhere between $80,000 and $90,000 and that the likelihood of coming in at the lower cost estimate is around 20%.  This leaves an 80% chance that our costs will come in around $90,000.  Looking at our current capabilities we estimate that we have a 90% chance of being able to meet all conditions and thus avoid having to pay damages.</p>
<p>Putting all of this into the decision tree pictured below, we conclude that accepting the liquidated damages clause is the better business decision.</p>
<div id="attachment_498" class="wp-caption aligncenter" style="width: 310px"><a href="http://pharma-bi.com/wp-content/uploads/2009/12/EMV_Original.jpg"><img class="size-medium wp-image-498" title="Decision Tree: 90% Probability of Avoiding Damages" src="http://pharma-bi.com/wp-content/uploads/2009/12/EMV_Original-300x159.jpg" alt="Decision Tree: 90% Probability of Avoiding Damages" width="300" height="159" /></a><p class="wp-caption-text">Decision Tree showing the EMV of two contract options</p></div>
<p style="text-align: center;">
<p>But how good is our estimate for avoiding damages?  Can we really trust it?  What data do we have to back it up?  Have we really considered all the factors that can influence our estimate?  After all, as the image below shows, if we are off by only 20 percentage points, the decision becomes a toss up.</p>
<div id="attachment_499" class="wp-caption aligncenter" style="width: 310px"><a href="http://pharma-bi.com/wp-content/uploads/2009/12/EMV_TossUp.jpg"><img class="size-medium wp-image-499 " title="Decision Tree: 70% Probability of Avoiding Damages" src="http://pharma-bi.com/wp-content/uploads/2009/12/EMV_TossUp-300x159.jpg" alt="Decision Tree: 70% Probability of Avoiding Damages" width="300" height="159" /></a><p class="wp-caption-text">A decision tree showing what happens when we lower the assumption for avoiding damages from 90% to 70%</p></div>
<p style="text-align: center;">
<p>In a decision tree each chance node acts as a weighting factor, so it is worthwhile to pay special attention to events that are estimated to have a very high or very low chance of occurring.  We want to be sure that we have good data to back up these optimistic (or pessimistic) numbers.</p>
<p>Of course it is not always feasible to gather all the data we need.  Sometimes the data is too expensive given what is at stake, sometimes it is unavailable and sometimes the quality of the data is too unreliable for a given purpose.  In that case, experience and judgment need to fill in the data holes.  We also call this “making assumptions.”</p>
<p>When making assumptions, we should clearly identify them and decide what to do when one or more of them has to change.  We need to</p>
<ul>
<li>identify      which factors influence our assumptions</li>
<li>determine      how these factors influence the result</li>
<li>be      able to recognize when a significant change in our assumptions is needed</li>
<li>have      a process in place to handle these changes when they do occur.</li>
</ul>
<p>No one can predict the future with certainty.  But the more we understand the probabilities, the better prepared we are.</p>
]]></content:encoded>
			<wfw:commentRss>http://pharma-bi.com/2009/12/why-we-need-good-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

