Are you looking to build a custom bullet that says something along the lines of "Dallas has increased 49% over the quarter" or "YoY Furniture has fallen -12%"? If yes, this guide will walk you through an example of how to build out a custom bullet that analyzes the difference of a measure between two periods (WoW/QoQ/YoY/etc). If you are not familiar with adding custom insights, please review this article before you begin! 


Recommended Requirements: 

  • Two Dimensions - 1 time period dimension (primary); 1 non-time dimension (secondary)
  • 1-3 measures depending on your use case 


Objective: Create a custom bullet that tells us the percent difference quarter over quarter of the number of issues in each city displayed in our drilldown sections


Steps: 

  1. Drag on the extension and make sure your time period dimension is ordered first; select Continuous story type  
  2. In the edit modal, we want to create a custom insight within the first drilldown section
  3. First, we want to create two context variables that will represent our "Current Quarter" and "Previous Quarter"
  4. Next, we will start to create our "increased" bullet by adding our custom language and functions. The content of this sentence should result in "[City Name] increased [X%] over the quarter." 
  5. This first function will print the section's City Name. Since this custom bullet will appear in all the drilldown sections below as well, this function will allow the city name to be dynamic and match its section. After you add the function, type "increased" following it.
  6. Next, we want to add the function that will give us the percent change of # of issues quarter over quarter. Below you'll find explanations for the arguments for the "PercentDifference" function.
    • Dimension = Quarter(Date); select your timeperiod dimension
    • Measure = Sum(Number of Issues); select the measure you would like use for the QoQ calculation
    • First Dimension Value = Previous Quarter; this is one of my context variables - always select the original number here
    • Second Dimension Value = Current Quarter; this is the other context variable - always select the new number here
    • Filter Dimension Value = Current City value (dynamic); this is the pre-set context variable - this will enable the tool to find # of issues data for the city in question
  7. Now we want to Copy this bullet so we can create a "decreased" version. The functions can stay as they are.
  8. Now we want to add in Conditions so that only one of these sentences will write depending on the data. We'll start with the "increased" bullet.
    • Left Argument - Value function
      • Dimension: Quarter(Date); select your timeperiod dimension
      • Measure = Sum(Number of Issues); select the measure you used for the QoQ calculation
      • Dimension Value = Current Quarter; one of the context variables
      • Filter Dimension Value = Current City value (dynamic); this is the pre-set context variable
    • Middle Argument - > (greater than)
    • Right Argument - Value function
      • Dimension: Quarter(Date); select your timeperiod dimension
      • Measure = Sum(Number of Issues); select the measure you used for the QoQ calculation
      • Dimension Value = Previous Quarter; one of the context variables
      • Filter Dimension Value = Current City value (dynamic); this is the pre-set context variable
  9. Now we need to follow those same steps for the "decreased" bullet. The one difference is that we are going to switch the middle sign out to be < (less than). The right and left arguments remain the same!
  10. Now we are ready to hit Save and see the sentences evaluate in our narrative!

Tip: If you'd like to expand the number of cities the narrative reports on, you can change this by going into the Settings Modal > Language > adjust Number of Drilldowns. After you adjust, open the Edit Modal once, hit save, and when you exit you'll see the custom bullet appear on the additional drilldown sections!