Tip for showing more than 400 items on a chart axis
Problem Statement
There is a limit on the number of items that can be displayed on a chart axis in Anaplan. Per the Anapedia page on Chart Settings:
Note: The maximum number of items that can be included in a chart axis is 400 items.
How do I display my chart if my axis has more than 400 items?
https://us.v-cdn.net/6037036/uploads/Y3GT1N4DK68C/image.png
Solution (Workaround)
While the actual limit is still in place, it is possible to work around the limit if you are willing to accept a lower fidelity visualization on your chart.
The approach taken in this solution is to "re-scale" your data from a larger scale onto a 400-item scale. The formulas used are based on this helpful answer from Stack Overflow.
What we had originally:
https://us.v-cdn.net/6037036/uploads/4HM179XMVSVA/image.png
What we want:
https://us.v-cdn.net/6037036/uploads/5PSNDF1PCD3L/image.png
Data
In this example, we have a list with 512 items and associated values that we want to plot on a chart.
https://us.v-cdn.net/6037036/uploads/TJXZCMJYQLEG/image.png
https://us.v-cdn.net/6037036/uploads/MRIKYU37Z0IM/image.png
https://us.v-cdn.net/6037036/uploads/RS4NTQ8THUID/image.png
System
Using system modules, we can set up the basic structure of the re-scaling calculations.
https://us.v-cdn.net/6037036/uploads/1CK9DKCMQD0V/image.png
SYS01 includes constants based on the current limits for the axis on UX cards. These values will be used in downstream calculations.
https://us.v-cdn.net/6037036/uploads/H92014N4B8QI/image.png
SYS02 is part of our Attributes module. The Sequence line item leverages a simple RANK function to provide an ordered numbered list of the items in our list. We add additional line items to leverage Anaplan aggregations to get the min and max values for the ordered list. We will need these values for downstream calculations.
https://us.v-cdn.net/6037036/uploads/197WZJHI12G3/image.png
The above shows the result of the SYS02 calculations.
https://us.v-cdn.net/6037036/uploads/257PWXIZLDT9/image.png
SYS03 calculates the Scale Conversion Factor, which is used to convert an axis value from the full scale into the compressed scale. Note that this module does not require the My Items dimension.
https://us.v-cdn.net/6037036/uploads/FS8U975YTZZK/image.png
Finally, in SYS04, we bring back in the My Items dimension to derive the values we need in order to derive our new scale. First, we calculate the new "sequence" value based on the conversation factor. We then round this value to get a whole number, and use an ISFIRSTOCCURRENCE() function to build a filter that will only display the first value in each sequence "bucket".
https://us.v-cdn.net/6037036/uploads/3H1A1X9LO6KF/image.png
Output
The last step in our solution is building the chart to leverage the compressed sequence rather than the full sequence. To do this, we just need to apply our filter to the original dataset.
https://us.v-cdn.net/6037036/uploads/F2V46ECNHLL3/image.png
The final result is a chart that shows the larger scale, even though it has only actually charted 400 values! This is also why I mentioned earlier that there is a loss of fidelity — not all of the values are present in the chart. You will need to determine whether or not this workaround is appropriate for your specific dataset.