13 Replies Latest reply: Nov 4, 2015 2:52 PM by Krishna Nagulapally

# Classes within a class

Hello!

Is there any way to create classes within a class?

• ###### Re: Classes within a class

In general, I would say yes, like hierarchical dimensions: Years can be broken down to Months, Days etc.

An Integer can be split into its tenth, its hundredth etc.

• ###### Re: Classes within a class

I want to create this tree for which I need to create classes within  a class. How can I do

that??

• ###### Re: Classes within a class

Not possible.

• ###### Re: Classes within a class

You can Create, but what is the need of creating interval again of already created interval??

=class(Class(Temp,10),20)

You can do something like above, if you use inner class interval only it would create interval of 10 say 0-10,10-20 like this

If you use Class within Class it would give you 0-20,20-40 like this..

• ###### Re: Classes within a class

provide some sample data with clear description of what you are trying to achieve.

• ###### Re: Classes within a class

I have a two variables month and blood group. I want to create a dimension of month in which I have two classes for month say CLASS 1 (includes first six months of the year) and CLASS 2 (includes last six months of the year). Then within the CLASS 1, I want to create two more classes of second variable "Blood Group" say BG1 (Includes blood group A+, B+) and BG2 ( including blood groups O+, AB+).

• ###### Re: Classes within a class

Also Please provide some sample data(the heirarchical data ) so that i can play around with it and get back to u with a solution.

• ###### Re: Classes within a class

This is the data.

 Result Blood Group Month of Birth 3(60-75%) B+ November A+ August 1(>90%) O+ October 4(45-60%) A+ November 3(60-75%) B+ March 3(60-75%) O+ July 3(60-75%) AB+ January 1(>90%) O+ February 2(75-90%) September February 2(75-90%) B+ July 2(75-90%) B+ April 4(45-60%) April 4(45-60%) February 3(60-75%) August 4(45-60%) May 2(75-90%) B+ January 1(>90%) AB+ January 3(60-75%) April 2(75-90%) O+ December 2(75-90%) O+ August 2(75-90%) July 2(75-90%) AB+ April 3(60-75%) October 4(45-60%) B+ August O+ October
• ###### Re: Classes within a class

BG:

F1, F2

A+, BG1

B+, BG1

AB+, BG2

O+, BG2

];

MoB:

F1, F2

January, CLASS1

February, CLASS1

March, CLASS1

April,CLASS1

May,CLASS1

June,CLASS1

July,CLASS2

August,CLASS2

September,CLASS2

October,CLASS2

November,CLASS2

December, CLASS2

];

[Blood Group],

[Month of Birth],

ApplyMap('MoB', [Month of Birth], 'MoB map not found') as [Month of Birth Class]

FROM YourSources;

• ###### Re: Classes within a class

This way?

• ###### Re: Classes within a class

Well Thanks Swuehl for your effort but I don't know how to work with this script. Isn't there any Expression that I can use in the UI??

• ###### Re: Classes within a class

Yes!!!

How did you do this?

• ###### Re: Classes within a class

I have done in qlikview.

(the expressions and data modelling is pretty much the same with qlik sense and qlikview.)

See attached.