Filters on metrics
In Chapter 3, Schema Objects – Attributes, we learned how to build filters on attributes to restrict the data returned from the data warehouse using a list of elements. Similarly, we can create filters using values of metrics. The difference—as said—is how the SQL sentence will be generated when applying the filter: attribute filters appear in the WHERE
clause, while metric filters appear in the HAVING
clause. For those of you SQL superstars, I do not need to explain that WHERE
restricts before aggregation, while HAVING
restricts (of course…) after aggregation.
Getting ready
In the previous recipe we added a new fact table. Before we go on, we should specify the Product
FK so that MicroStrategy can JOIN
the FactResellerSales
Get Business Intelligence with MicroStrategy Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.