6 Replies Latest reply: Apr 11, 2011 4:55 AM by tjanosek RSS

    Dimention grouping

      Hi all,

      My question pertains to grouping in the dimentions. How is that done? is there a specific code for it?

      For example i have a dimension 'Number of months' and another field ' number of customers'. What I have to do is make a chart which doesnt show the Number of months but it shows RANGES. e.g. upto 3 months, supto 6 months, upto 10 months and so on.


      the bar chart should show the number of consumers which have due ' upto to 3 months' etc.


      Help regarding this is much apprecaited. \



        • Dimention grouping
          Nicolai Jørgensen

          Maybe Class() could be the thing you are looking for?


          class( expression, interval [ , label [ , offset ]] )

          Creates a classification of expressions. The bin width is determined by the number set as interval. The result is shown as a<=x<b, where a and b are the upper and lower limits of the bin. The x can be replaced by an arbitrary string stated in label. 0 is normally the default starting point of the classification. This can be changed by adding an offset.

          • Dimention grouping


            If you want to use automatic same-length intervals, you can use class() function as a calculated dimension. This is an example:


            This will create automatic 3-month intervals from number_of_months field.

            Otherwise, if you like to specify your own intervals, you have to use intervalmatch clause in script, to connect your intervals to number of month field. Usage is like this:


            Load id, number_of_months from Whatever;



            LOAD * INLINE [

            from, to, name

            0, 50, 0-50

            51, 100, 51-100

            101, 10000, 101 and more



            left join (table1)

            intervalmatch (number_of_months)

            Load from,


            resident table2;


            Than you will have your own intervals named 0-50, 51-100 and 101 and more connected to table with number of months. When doing intervalmatch join, you need to have all needed field already loaded in qlikview.


            Hope this helpes:)