Symptom
- Is it possible to display negative values in Tree Map chart?
- When adding a Tree Map chart that contains negative values in SAP Analytics Cloud, it display the error:
"A chart cannot be provided because this chart type does not support mixed positive and negative values"
Environment
- SAP Analytics Cloud
Reproducing the Issue
- In SAP Analytics Cloud, create a Story
- Insert a Tree Map chart
- Add a Measure to the chart that contains negative values.
- Instead of displaying a Tree Map chart, it displays the error:
"A chart cannot be provided because this chart type does not support mixed positive and negative values"
Cause
- By design, Tree Map chart cannot display negative values.
Resolution
- Create a Calculated Measure to remove the negative values from the chart:
- In SAP Analytics Cloud, open the Story containing the Tree Map chart.
- In the Edit mode, select the Tree Map chart.
- On the right side, in the Builder pane, under Measures remove the Measure.
- Then under Measures, click "Add Measure", and select "Create Calculation"
- In the "Calculator Editor", select the type: "Calculated Measure"
- In "Edit Formula" create a condition to return zero (0) for the Measure when there is negative values like:
IF ( [<Insert Measure Name Here>] < 0, 0, [<Insert Measure Name Here>] ) - Click "OK"
Now, the Tree Map chart will display data.
Keywords
SAC, treemap , KBA , LOD-ANA-DES-CHART , SAP Analytics Cloud core charting , Problem
Product
SAP Analytics Cloud 1.0