Jul 2, 2020

Troubleshooting Feeders in TM1 with Emojis

Emojis can do more than just make your messages fun. They can also be used to highlight important information, as Emojis are supported by most softwares. In IBM Planning Analytics and TM1, they are supported by Architect, TM1 Web and Planning Analytics Workspace.

This article explains how to troubleshoot feeders in IBM TM1 and Planning Analytics with the help of Emojis

What are feeders?

Amongst TM1’s many unique selling points in the marketplace, the most important is the outrageous speed of calculation compared with its competitors.

The underlying technology to this speed originates from what is known as the “Sparse Consolidation Algorithm” or “Skipcheck” Algorithm. In short, it is an aggregation mechanism which adds only the raw numbers in your cubes, but skips the zeroes.

When Skipcheck is switched on, TM1 requires a little flag on each calculated cell to be aggregated. This flag is called a feeder .

Understanding underfeeding and overfeeding

Writing feeders is a big part of a TM1 developer’s job. When all calculated cells with values have a feeder flag , the sum of all Fed cells is calculated and the consolidation is considered fed ✔️️.

If calculated cells resulted to zero have a feeder flag , it is called overfeeding ⚠️. It means that zero cells will be consolidated. While a small amount of overfeeding might not have an impact, large cubes with a lot of overfed cells will result in lower end-user performance.

When calculated cells are not fed ️️, these will not be aggregated and therefore values at consolidated levels will be wrong. This is called underfeeding . Underfeeding issues can be spotted by users as it will result in the wrong values being shown at the consolidation levels.

Troubleshooting underfeeding and overfeeding

Architect already caters for underfeeding issues. To check if a cell is fed, you can right click on a cell and use the “Check Feeders…” feature:

Troubleshooting overfeeding requires a bit more work. A technique can be found in the following article:

Visualizing underfeeding and overfeeding

Let’s see how we can visualise the feeding status of a cell (Fed✔️️, UnderFed or OverFed ⚠️) with the help of some extra rules and emojis.

How does it work?

This technique can be applied on any cube. It just requires some extra measures, and new rules.

In this example, our cube has 5 dimensions with one measure dimension. We want to check if the value for each account is fed correctly:

To achieve this, few elements needs to be added to the measure dimension as below:

  • FeederFlag: Always equal to 1 and fed from the measure we are investigating.
  • IsFed: Sum of feeders flags
  • IsOverfed: Check if cell is overfed
  • IsUnderfed: Check if cell is underfed
  • FeederCheck: Consolidate isOverfed and isUnderfed flag
  • OverfedRatio: Calculate ratio IsOverfed / IsFed

Using some emoji-rich custom numeric formats for a nicer presentation:

ElementFormat
FeederCheck#,##0" ⚠️";#,##0" ";"✔️️"
IsFed#,##0" ";-;" ️️"
FeederFlag" ";" ";-
IsUnderfed#,##0" ";#,##0" ";-
IsOverfed#,##0" ⚠️";-;-
OverfedRatio0.00%;-0.00%;-

The measure dimension will look like this:

Adding Rules

This technique requires rules to be inserted. The logic is as below:

For leaf cells, to work out which cells are actually fed, we are using a dummy element called FeederFlag always equal to 1 and fed from the measure we want to check:

This then naturally consolidates to the IsFed measure.

Based on this, calculating feeder status on leaf level is quite straight-forward, but it gets more tricky to aggregate them correctly, especially the underfed ones. To work around this, we are taking advantage of some properties of the Consolidated functions, including ConsolidateChildren.

A cell is underfed if it satisfies the condition Value <> 0 and IsFed = 0:

A cell is overfed if IsFed > 0 and Value = 0:

Using ConsolidateChildren this way means that this might not scale well for large models. Please use this technique in development as it might impact the performance.

The details of all rules can be found in the text file below:

Two things to be aware when testing these rules in your model:

  • You will need to update the dimensions in the ConsolidateChildren and ConsolidateCount functions.
  • As N and C rules are separated, you need to make sure that the tm1s.cfg parameter AllowSeparateNandCRules is set to true:

Feeders

To make it all work, we just need to feed two of the helper measures (FeederFlag and IsOverfed) from the measure that we want to be checking (in this case Value):

This technique will enable you to find very quickly where there is a feeder issue:

When to use this technique

This technique can be useful in a couple of scenarios:

  • As a good teaching aid when trying to explain someone how feeders actually work
  • In development to make sure to detect underfeeding quickly and also to stay on top of overfeeding before it explodes
  • As a quick health check tool

Just be mindful to use this technique only on a development environment as it requires two extra measures to be fed. On larger models it can impact the performance of your application.

To learn more about feeders, we recommend you to register to the Cubewise EDU Advanced Rules training.

READ MORE:

Related content

Loading related content