Waterfall Chart in Cards

Joined
Jun 30, 2022
Messages
1
Likes
0
Points
1
#1
Waterfall Chart in Cards

A simple waterfall chart can be made in cards using the Chart component. Once the card context has set for the cube with data for the waterfall chart, the following properties of the chart need to be adjusted. In this example, we are using the Profitability cube to show the revenue, profitability, and cost associated with a particular customer.

Required properties:

  • Plot Instructions: Set instructions that represent the bars of the waterfall chart. In this example we add revenue, each cost type, and profit from the Account dimension
  • Plot X Label: Label for each bar of the chart. In this example we set it to ELEMENT("Account")
  • Series Instructions: Set instructions for the selected customer (Customer element from card context). To get this we add the 'Insert using Formula' set instruction and add ELEMENT("Customer")
  • Series Format: Rectangle (default property)
  • Series Title: Set this to any text, as the Series Legend is not needed for this chart. (To enable Legend, set Legend Position to any value other than 'None")
  • Series Y Value: Link to your cube data, in this example it is linking to the Profitability cube LINK("Profitability", []). To show costs as negative, use IF( ELEMENT("Account") = "Revenue", LINK("Profitability", []), 0-LINK("Profitability", []) )
  • Series Baseline Model: Set this to Balance. Not required to render the chart, but necessary to make the chart a waterfall instead of a standard bar chart

Some additional properties can be adjusted for additional customization

Useful additional properties:

  • Chart Title
  • Chart Subtitle
  • Data Labels: Change to 'Yes' to show amount labels for bars
  • Data Label Color
  • Plot Color Formula: Two easy ways to change the colour of the bars are by splitting a list of colors based on the plot index, or a cascading if statement. More bars will require more colors listed in the split, or multiple cascading IF functions to match the segment count
    SPLIT("#FF4054,#323652",",",NUMBER(VARIABLE("plot-index")))
    or
    IF( ELEMENT("Account") = "Revenue", "#FF4054", "#323652" )
 

Attachments

Last edited: