How to sort a multi-chart in N4V for Webi when the dimension format is not suitable for sorting

Anonymised summary of support ticket #650453 (2023-08-23)

Symptom

In a multi-chart (e.g., stacked bar), sorting on a dimension value (e.g., 'mmm-yyyy') is not possible because the format is not suitable for alphabetical or natural sorting. The dimension used for visualization (e.g., 'MAAND_JAAR') cannot be sorted properly using standard Webi sorting options.

Environment

SAP BusinessObjects Web Intelligence with N4V FOR WEBI extensions. Tested with Webi 4.3 and N4V custom elements.

Resolution

  1. Create a variable that combines year and month in a sortable format (e.g., 'YYYY-MM') instead of using the original dimension. This variable will be used for sorting in the multi-chart.
  2. Alternatively, create a hidden HTML-compatible variable that concatenates the sortable format (e.g., 'YYYY-MM') with the original dimension (e.g., 'MAAND_JAAR'). Use this variable in the multi-chart while ensuring the original dimension is displayed. The hidden part will be interpreted as HTML and only the formatted dimension will be visible.

Other resolution

Note: Webi does not support the 'hidden dimension' feature for N4V custom elements due to a restriction. The workaround involves using variables to achieve the desired sorting. Ensure data consistency between the sortable format and the original dimension to avoid display issues.