🇨🇦 SAP Analytics Cloud – How to Create a Dynamic Bar Chart with 2 Color Patterns

It might seem like a simple task. However, getting the chart above in SAC isn’t as straightforward and it requires careful steps and attention to detail. In this tutorial, we’ll go through the process, step by step, on how to create a visually stunning hybrid bar chart.

Example

To begin, open a blank canvas in SAC and add a Chart element. Select your preferred data model for the chart.

Creating Actuals Restricted Accounts

  1. Head to the builder panel and navigate to the Accounts section. Click on the “+Add Account” button and choose “Add Calculation.”
  2. Opt for a “Restricted Account” as the account type.
  3. Assign the name “actuals” to the account and ensure it aligns with your desired metric.
  4. Under dimensions, select Date and then Select by Range
    • Modify the “Current Date” option from “System Date” to “+Create Current Date Input Control.”
    • Provide a name for the Current Date Input Control and set the granularity to “Month.”
    • Click “Ok”
  5. Enable the “Include Range up to Current Time Interval” option in the “Range 1” section, allowing users to adjust the range as per their preferred month.
  6. Click “OK”
  7. Add another dimension by selecting “+Add a Dimension” after Date and choose “Version.” Opt for “Select by Member” and select your desired “Actual” version.
  8. Click “OK”
  9. Confirm that the “Enable Constant Selection” toggle is on and only the Version dimension is selected, excluding Date.
  10. Click “OK” to finalize the creation of the account.

Creating the Full Year Forecast Restricted Account

Next, let’s duplicate the Actuals account and tailor it to represent the Forecasted values.

  • Click on the three dots of the Actuals account you just created and select “Duplicate.” This duplication serves as the foundation for the second measure.
  • Click on the three dots of the duplicated account and choose “Edit Calculation.”
  • Rename the account as “Full Year Forecast” and adjust the date dimension value to encompass the entire year of 2023. Set the Version as “Forecast.”
  • Click “OK.”

Creating the Forecast Restricted Account

To exclusively display the forecasted period, we’ll create a calculated account that calculates the difference between the Full Year Forecast and Actual accounts.

  • Next, remove the Full Year Forecast account from the widget.
  • Configure the bar chart by selecting the Stacked Bar/Column option and changing the orientation to Vertical.
  • Add a measure and a date dimension to the chart.
  • Ensure that the builder panel reflects these selections.

Styling and Formatting

  • Scroll down to the styling panel and activate the “Avoid Data Label Overlap” option to prevent the display of zeros.
  • Click on the chart, then select “Show/Hide” from the three dots on the top right corner, and disable Data Labels.

  • Play around with different colors for the categories and background to maximize the visual impact of the chart.

Observe the final result by adjusting the months under the filters panel.

I hope you found this example helpful. If you have any questions or suggestions, please leave a comment below.

Thanks for reading, and see you next time!

Jorge Rocha

Ler este artigo em Português Brasileiro

One thought to “🇨🇦 SAP Analytics Cloud – How to Create a Dynamic Bar Chart with 2 Color Patterns”

Comments are closed.