Introduction In this article, we’ll walk through how to implement Period Over Period (PoP) comparisons in Looker. While Looker suggests a few approaches for comparing different time periods, we will introduce a customized approach developed by our team at Nupanch. Our approach highlights enhancements that can be made to Looker’s suggested methods. This guide includes code snippets and example outputs, so you can easily replicate these techniques in your own Looker instance. Understanding Period Over Period Comparisons Before diving into the implementation, let’s quickly explore why Period Over Period comparisons are so useful. When measuring performance, it’s critical to compare current performance against previous periods. Some common comparisons include:
Looker’s Built-in Methods for PoP Analysis Looker provides a few built-in methods for performing PoP comparisons:
Limitations of Looker’s Built-in Methods While Looker’s native methods work well, there are some limitations:
Nupanch’s Approach to PoP Analysis in Looker Our approach simplifies Period Over Period analysis by creating predefined "analysis periods" and "breakdowns." This method uses one parameter, one filter, and several dimensions that help filter dates according to the selected parameter. Here’s how it works:
Implementing a view to enable period over period dimensions in LookerTo implement this:
Our Customized PoP Analysis Solution 1. PoP Pivot Dimension The PoP Pivot dimension compares two periods directly, visualizing them in charts like lines or bars. This allows us to see each period (e.g., "This Month" vs "Same Month Last Year") in separate visual elements. For example, the values might look like:
The values “MTDoMTDLY” etc. indicate the specific comparison being made. For example, “MTDoMTDLY” is used for Month to Date vs. Month to Date LY. 2. PoP Row Dimension The PoP Row dimension breaks down periods into granularity like days, weeks, or months. Since the dates will differ between comparison periods, we use metrics like "Week of Year" or "Day of Year" rather than specific dates. 3. Sort By Sorting ensures that the PoP Pivot and PoP Rows are displayed in logical order. For instance, in a Cyber 5 comparison, we want to see the rows ordered as Thursday, Friday, Saturday, Sunday, and Monday. We accomplish this by sorting based on a combination of "week of year" and "day of week."
4. Filter Date The Filter Date helps to accurately filter date ranges for the periods you’re comparing. For example, if you’re comparing "This Month vs Same Month Last Year," Filter Date selects the appropriate date ranges for analysis by setting the start and end dates for both periods. 5. To-Date The To-Date filter ensures you're comparing “apples to apples” by matching incomplete periods. For instance, if today is Wednesday and you’re comparing this week to the same week last year, To-Date ensures that only the first three days of data are compared, making the analysis fair. As seen above with the To-Date filter you can limit the previous period to the days in the current period and compare apples to apples. Conclusion Implementing Period Over Period analysis in Looker can be straightforward with built-in methods, but it becomes even more powerful when customized to meet specific business needs. Our approach allows you to create predefined periods, compare them more effectively, and visualize the data in meaningful ways. If you’d like assistance implementing this in your Looker environment, don’t hesitate to reach out to us at Nupanch. Appendix: Key Code Snippets Here are some handy snippets for reference when setting up your analysis: Current_date : Current_day : Current_month : Current_year : Current_week_start : Code snippet below is for Sunday as week Start. Can remove DateAdd if Monday is required as start of the week
0 Comments
Leave a Reply. |
Archives
June 2018
Categories |