Using ATTRIBUTE VALUES LOOPING functions

    Icon

    This recommendation applies to functions eachMember(), membersSum(), membersAvg(), membersMin() and membersMax().

    The common principle of these functions is iterating over the desired attribute values. E.g. eachMember('L_CITY') { ... } iterates over cities contained in the source data set. If there are N unique cities, the loop is executed N times. Depending on the hardware configuration, execution of one of these function is very demanding and affects the performance of the entire system if not used properly. The main criterion is how many times is the loop executed, in other words, how many unique entries does the chosen attribute have. According to our best practices and feedback from customers, the correct usage should follow this matrix:

    Unique attribute valuesUsageExample
    100.000KPI label, chart, table or map with up to 20 elements (time entries, attribute values).Table showing indicator with looping function for list of 20 cities.
    20.000KPI label, chart, table or map with up to 100 elements (time entries, attribute values).Table showing indicator with looping function for list of 20 cities for 5 months.
    5.000KPI label, chart, table or map with up to 500 elements (time entries, attribute values).Table showing indicator with looping function for list of 20 cities and 4 countries over 1 month.
    1.000KPI label, chart, table or map with up to 2.000 elements (time entries, attribute values) Table showing indicator with looping function for list of 50 cities and 10 countries over 5 months.

    The conclusion derived from the matrix above is, that these functions should be used in combination with maximum 100.000 unique attribute values. For larger amount of data users may want to use the BellaDati-R module, which is coming in Q2/2016.

    Icon

    For some use cases, consider using forEachRow() instead of looping functions.

    • No labels