Skip to Content
Author's profile photo Arun Varadarajan

Counters in Infoproviders – Boon or Bane ?

Counters in ODS
We all know the ODS has a generic record count that can be used – but then the record counter cannot be used in all cases – especially when you want to apply restrictions / exception aggregation etc..

It is nice to have a counter set to value one when loading the data
In case of overwriting mode – you can use this as a record counter and also use it for exception aggregation in the data models and reporting
If you have additive mode – then this value can then be used to calculate averages if required and also help understand the level of aggregation

Counters in cubes

Counters in cubes are tricky – because you will have to make sure you handle the reversals when the values change – for instance if you have a hard counter of value 1 then when you have multiple records with the plus and minus in the cube then the counters will become additive.
Also if you have a hard counter then compression with zero elimination will not happen in the cube leading to blank values in the queries which should have ideally been deleted.

Possible uses :

  1. Count the number of records
  2. Count the number of unique occurrences ( count of all values <> 0 with exception aggregation in the query )
  3. Use the counter in a formula to determine average if required – This can be done using the key figure settings but then the counter option gives you another way to achieve the same


 Always use caution when using counters in Cubes or DSO with additive Key figures to make sure that record deletion is handled properly when you are reversing records using the Key figure values or using recordmode

These are some of the ways I thought counters would be used and why counters need to be used  in all data models. Do you have anymore uses of counters or think they should not be used at all ..?

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      I have yet to see a case where a requirement that can be served by a counter KF in the cube can not be served by a CKF in query with exception aggregation.  Maybe it was needed in 3.x and earlier days when exception aggregation worked different.

      It really is a non-issue.

      Author's profile photo Arun Varadarajan
      Arun Varadarajan
      Blog Post Author
      A lot of it changes when we got Exception aggregation ( In Query Designer ) in 7.0
      But then in some cases we found that using Counters and exception aggregation on the same was sometimes faster than doing the same at the query level.. and since most of our models existed in 3.x and then into 7.0 .. we did not make any changes per se... and this was for some query designs alone and I could be wrong too...
      Author's profile photo Yogesh Patil
      Yogesh Patil
      Yes, we also observed that if you have exceptional aggregation based on the Counter from InfoProvider, query runs relatively faster.
      Arun, thank you for the sharing this information.