Posts

Showing posts from January, 2017

The count distinct adventure - Part II

During the first part of the topic we introduced the challenge of count distinct and 2 solutions to address them, along with their advantages and disadvantages. The list of solutions continues in this final section and these, presented below, are also the solutions that we use across our projects where CDs are required. Solution 3 - Count Distinct derived metrics This functionality is probably the most known by the users and mostly used, as it offers flexibility and the necessary control without the intervention of the IT teams. Creating =derived metrics in reports, Vis and documents is a walk In the park, using the context menus. With the deployment of V10, things got even more flexible adding support for conditional derived metrics (IF and CASE) by using attributes directly. As you probably remember, or still use today, up until V10, building conditional derived metrics was a hustle, as only metrics could be used with IF and CASE statements. You would first create a MAX(<...

The count distinct adventure - Part I

Image
I've been working with several reporting and data analysis tools for a while now. Started with SSAS cubes, then Business Objects came along, later, MicroStrategy (MSTR) joined the team and then Tableau. They all have their own ways of managing count distinct (CD), but they yet have more in common. Manage simply means yielding the good results every time a user interacts with that CD measure. Us, the BI tech guys, we have a goal to facilitate easy data analysis to the users, especially that most of them work in non-IT domains and have different skill levels. Throughout time, CDs have proved to be a difficult thing to manage and if it wasn't the ease of implementation, it was the performance impact we soon discovered. It's been known that the difficulty lies in the nature of this non-additive measure. Basically, we cannot sum it as a standard revenue measure, but you always have to re-calculate it when the level of the aggregation changes. Have to admit that I like a goo...

Derived Attribute is the New Custom Group

Image
There’s always delicate balance, when developing a MicroStrategy Schema, on when to know to build an auxiliary object in MicroStrategy and when to push that work to the ETL/Database. Most of us must have faced situation when there is need of virtual attribute and Database developers are busy to provide attributes in desired format directly in database or business requirements are different for one particular user or group. In this situations we generally opt for Custom groups which impacts performance drastically. Ø   Each Custom Group element is a separate filter and generally creates a separate pass of SQL. Ø   Multiple Custom Groups on a report end up multiplying by each other in regards to the number of passes of SQL.  So if you have a Custom Group with 10 elements, and a 2nd Custom Group with 10 elements, that’s 100 passes of SQL times however many passes the Metrics on the report create. With 10 version of MicroStrategy, we can create derived a...