A Deeper Look at LOD Expressions—Week 2
In today's post we will continue to discuss Level of Detail (LOD) Expressions. Since it is often easiest to learn through examples, we will showcase some common analytical questions that LOD Expressions solve elegantly. We will start with simple examples and get progressively more complex throughout the series.
Why is this important?
LOD challenges arise everywhere and whether you realize it or not there is a very good chance you have run into them before. LOD Expressions allow us to fix a calculation to a specified dimension so that it will always compute at that level of granularity. You can think of it as a hidden shelf to put dimensions.
Who are LOD Expressions for?
Have you ever asked a seemingly simple question of your data and not been able to find a useful solution? Have you ever found yourself creating a complex workaround to those simple
questions? Then it’s very likely you have experienced an LOD related challenge.
LOD Expressions take Tableau's computational capabilities to the next level and both eliminate the need for many cumbersome workarounds and enable use cases that were previously not possible. After a little bit of practice everyday business users can use LOD Expressions to amplify their ability to see and understand data.
Let’s look at LOD expressions in a few real examples:
Histogram of Orders
Finding the number of times each customer made an order from our stores is an easy task. What if we want to know the number of customers who made 1, 2, 3 or 4 purchases in total? This is a simple question, but without LOD Expressions the solution would be difficult. The order data in this example has multiple items per order, therefore we cannot just make a histogram from the count distinct of orders. We need to find a way to always set the distinct count of orders to the customer dimension.
Daily Profit KPI
We can certainly view profit trends over time, but what if we measured our success by the total profit per business day? We would probably want to know the number of profitable days achieved each month or year, especially if we were curious about seasonal effects. The following workbook shows how LOD Expressions allow us to easily create bins on aggregated data such as profit per day rather than profit per transaction.
Comparative Sales
LOD Expressions open up a world of possibilities for cohorts, aggregates of aggregates, aggregated bins and many more areas. They also open doors to less obvious, but equally
valuable use cases such as comparing a section of our regions/items/employees to all others. The following example walks through how to compare a selected category to all of the other peer categories, which makes it easy to see how they are doing relative to each other.
相關文章
訂閱部落格
在 Ttableau,我們每天都會聽到有關資料、分析與視覺化內容的精彩消息。 我們的使命是協助使用者看見資料,洞察資料,而透過我們的部落格分享這類消息,是這項使命中關鍵的一環。 從提供有關如何更有效率地使用 Tableau 的提示,到瞭解使用者每一天是如何因應資料挑戰, Tableau 部落格是資料愛好者的天地。