If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Treemap is not working as expected, datasource is SSAS cube

Started by xyz, 04 Aug 2014 02:29:57 PM

Previous topic - Next topic

xyz

Hi All,

I have a requirement to use a treemap to show the levels, based on the selection from a 'Org Level' value prompt, for a selected measure.

I have overall four prompts:
1) Organization Hierarchy (Tree Prompt).
2) Org Level (Value Prompt).
3) Week (Date Prompt) and
4) Measures (Value Prompt).

Basically I have a Organization hierarchy with six levels in it and with Task, Hours, Overtime and Count measures. The Organization hierarchy is used as a Organization tree prompt as well as Org Level value prompt, both are cascaded prompts. if I select a level from a Org Level value prompt then the treemap should show those level and levels below it. I am using 'Treemap by value' type, where it requires two measure and three levels, where three levels is a must.

Organization Hierarchy Structure and Tree prompt:

All                                 -  Level 0
Culrns                           -  Level 1
   Dumb                         -   Level 4
   Deaf                           -   Level 4
   Blind                          -    Level 4
    Blind-by-birth             -   Level 5
     No Cure                     -   Level 6
     Cure                          -   Level 6
    Half-Blind                    -  Level 5

Org Level Value Prompt: Which show the levels below the selected level from Organization hierarchy tree prompt

Say Suppose in 'Organization Hierarchy' tree prompt, if 'All' is selected then 'Org Level' prompt will show levels below it. i.e Org Level 1, Org Level 4, Org Level 5 and Org Level 6. If 'Culrns' is selected in 'Organization Hierarchy' tree prompt then 'Org Level' value prompt will show Org Level 4, Org Level 5 and Org Level 6.

Basically, to achieve the requirement I can use the dynamic data items but it is not working as expected, and it is throwing error like Nesting of level is not permitted. The treemap by value requires two measures one for size of the box and one for the color. So I used Task for size and Hour for color. To fill the three levels, I have to capture the level number from 'Org Level' prompt and then pass it to data items to be used in one of the three levels. The expression I have written is looks like below.

'Lvl 1' expression which will be used in treemap.

descendants( #prompt('p_Organization', 'mun')#, #prompt('p_Org_Level', 'token')#)

Using 'Ordinal' function, I am capturing the level number for the selected level from 'Organization' hierarchy.

DataItem 2 - ordinal(level([DM].[Organization Hierarchy].[Hierarchy Tree]->?p_Organization?))
DataItem 3 - [DataItem 2]+1
DataItem 4 - [DataItem 3]+1

'Lvl 2' expression which will be used in treemap.

descendants( #prompt('p_Organization', 'mun')#, [DataItem 3])

'Lvl 3' expression which will be used in treemap.

descendants( #prompt('p_Organization', 'mun')#, [DataItem 4])

Can you guys, please help me how to go about it.

Thanks  Regards,
XYZ