2023 Week 06 | Timeline Stacked Bars


This week we have a lot going on! I originally found a hack about 2 years ago how to create a timeline stacked bar chart. I don’t know if I just didn’t find the easy way to do it or if they released a new feature since then. Anyway, this is what we’ll do today. For good measure we also throw in some dynamic fields and 2 ways to replace the default legends (one a little bit hacky – think outside the box!). Off we go!


  • Create a data set out of your dev org with Opportunity, OpportunityLineItem and Product2
    • Include only “won” opportunities
    • Structure your data so that you can build the following dashboard
    • Usually it’s easier to remove all fields you don’t need, but that’s up to you
  • Include a title that dynamically shows the selected year, the total revenue for the year and the granted discount
    • Colour the measure names and values according to the charts
  • Add a possibility for the user to filter by the year of the close date and make sure they can only select one year at a time
    • The filter should apply to all charts on the dashboard
  • Include a bar chart that shows total revenue and total granted discount
    • Colour the bars in light and dark grey
    • Make sure the bars are labelled on the left side
    • Hide the default legend
    • remove axis titles
  • Add a timeline bar chart
    • The time dimension should be the close date, by month
    • It should show total revenue in dark grey on the bottom and granted discount in light grey on the top
    • The total bar length should be equivalent to the revenue if we had charged our customers  the list price
    • Remove the default legend
    • Remove the axis titles

The resulting dashboard should look something like this:

The dataset will look very similar to the one in the first challenge.


This week uses the data from the standard objects that come with the CRMA Dev-Org. If this is your first challenge, you can sign up for a dev org here: https://trailhead.salesforce.com/promo/orgs/analytics-de


After you finish your workout, share a screenshot of your solutions or interesting insights on Twitter or LinkedIn using the hashtags #WOW2023 and #CRMA and tag @genetis@PreenzJ@LaGMills and @JaackParry. (Or you can use this handy link to do that)

Also make sure to fill out the Submission Tracker to track your progress and help us judge the difficulty of our challenges.


Coming later…
Scroll to Top