Klipfolio. The KPI Dashboard - Evolved
The KPI Dashboard – Evolved
1-877-233-6149
Contact Us

Displaying a column in only one drilldown level

Problem:

You want to show a certain column(s) in only one drilldown level

Solution:

The drilldown property displays a column only in one specified level. By using it in combination with a non-enum type, you can show the column only in the specified level and not others.

Level 1:
http://www.klipfolio.com/images/content/cookbook/drilldown3-1.gif
Level 2:
http://www.klipfolio.com/images/content/cookbook/drilldown3-2.gif

To display 'month' and 'apples' in the first drilldown level, we use drilldown: 1. Note that we set 'month' as type: enum because we want to drill down into it; we want to treat 'apples' data as numbers, so its type is number. Similarly, drilldown: 2 is set for 'week' and 'oranges'.

month {
    type: enum;
    itemcol: 1;
    drilldown: 1;
}
week {
    type: enum;
    itemcol: 2;
    drilldown: 2;
}
apples {
    type: number;
    itemcol: 3;
    formula: sum;
    drilldown: 1;
}
oranges {
    type: number;
    itemcol: 4;
    formula: sum;
    drilldown: 2;
}


Here's the entire source code for the above Klip:

<?xml version="1.0" encoding="UTF-8" ?>
<klip>
    <identity>
        <title>
            Displaying a column in only one drilldown level
        </title>
    </identity>
    <locations>
        <contentsource>
            <![CDATA[
            <item>
                <month>July</month>
                <week>week 1</week>
                <apples>20</apples>
                <oranges>5</oranges>
            </item>
            <item>
                <month>July</month>
                <week>week 2</week>
                <apples>10</apples>
                <oranges>15</oranges>
            </item>
            
            ]]>
        </contentsource>
       </locations>
       <setup>
           <autoremove>
               false
           </autoremove>
           <purge>
               permanent
           </purge>
           <autodrilldown>
               true
           </autodrilldown>
        <columns truncate="false">
            true
        </columns>
      </setup>
    <style>
        item {
            type: item;
            definition: all;
        }
        month {
            type: enum;
            itemcol: 1;
            drilldown: 1;
        }
        week {
            type: enum;
            itemcol: 2;
            drilldown: 2;
        }
        apples {
            type: number;
            itemcol: 3;
            formula: sum;
            drilldown: 1;
        }
        oranges {
            type: number;
            itemcol: 4;
            formula: sum;
            drilldown: 2;
        }

    </style>
</klip>

Leave a Comment

To leave a comment, you must sign in or register (it's free).

   
Comment Type:
Title:
Comment: