

In addition to calculating the components of the ratio (i.e. Out of all customers between the ages of 18 and 35 on who purchased a bike in 2007 and a helmet within 60 days following the bike purchase (but not on the same day), how many also purchased a bike tire within 90 days after the bike purchase? * Customers between 18-35 who purchased a helmet within 60 days after a bike purchaseĪnd who purchased a tire within 90 days after bike purchase SET DenominatorSet AS CustomerHelmetPurchase * Customers between 18-35 who purchased a helmet within 60 days after a bike purchase */

What you see below was the final product used to highlight a few tuning techniques…it runs in ~1 sec on both cold and warm cache.

In that post, we started with a really nasty query that took ~42 sec to run on a cold-cache and ~41 sec on a warm-cache. To showcase the power of pushing the calculations into the cube via the MDXScript, let’s revisit one of the queries from a post last year. In this post, we’ll pickup a query from a while back and I’ll highlight the benefits of leveraging the MDXScript… The Set Up In these cases, the next best place is to embed the business logic in the semantic layer (if you’re not sure why, read this)…which, if you’re using SSAS Multidimensional as your semantic layer, means using the MDXScript! time/skills/money) to make the necessary changes…or maybe the business logic just doesn’t scale well (enough) in the ETL (especially in low-latency/realtime scenarios where the ETL needs to be as fast as possible). Unfortunately, there are many scenarios where the business logic can’t be embedded in the ETL and/or data model…perhaps the data model is already well established and the client doesn’t have the resources (i.e. Plus it helps ensure 1-version-of-the-truth because report developers and business analysts don’t have to recreate the logic…it’s baked in. After all, if we can take the hit during our batch processing window – then that’s time we just saved our users since they won’t need to take the hit at query time (e.g. In the world of business intelligence, most people prefer to embed as much business logic as possible into the ETL and materialize it in the data model (i.e.
