Parametric MDX Performance Issue
Posted: Fri Mar 21, 2014 3:48 pm
Hi,
We have a requirement to implement Cascading Filters in websheets, so let's say we have 3 dropdowns ( SUBNM ), one for Region Selection, one for City Selection and another one for Customer Selection
When User Selects Region, the next drop down ( Cities ) should show only Cities of that specific Region and same idea for Customer Drop down.
We have created the Region Attribute in the City dimension and Also City Attribute in the Customer Dimension.
We are using MDX Subsets to populate the dropdowns, but our customer dimension is huge now, more than 600K elements.
In order to use the selection made from user, we have created a 2-dimensional cube called User_Selection with following dimensions :
}Clients
User_Selection_m
and then the MDX statement for my_Custumers subset uses the stored value of City as following:
{FILTER( {TM1SUBSETALL( [Customer] )}, [Customer].[City] = [User_Selection].(StrToMember("[}Clients].["+USERNAME+"]"),[User_Selection_m].[City]))}
This is taking 90 seconds to refresh.
It takes the same amount of time if I just refresh the MDX statement in the subset editor
So I sent some time to troubleshoot the issue it looks like if I just hardcode the City Name in the MDX, then the MDX refreshes in 10 seconds
so the following MDX runs in 10 seconds
{FILTER( {TM1SUBSETALL( [Customer] )}, [Customer].[City] = "London")}
Also I tried removing the USERNAME from MDX by hardcoding the User Name in the MDX statement, just to see if this is part of issue and IT IS. So if I hardcode the User Name, MDX refreshes in 25 seconds. So the following MDX runs in 25 seconds
{FILTER( {TM1SUBSETALL( [Customer] )}, [Customer].[City] = [User_Selection].([}Clients].[Test_User],[User_Selection_m].[City]))}
We did not notice this issue when the dimension was having less elements ( around 30K elements )
Any idea why is this happening and is there any work around?
We need a mechanism that stores the User Selection and the selection needs to be used to filter other dimensions
Thanks
We have a requirement to implement Cascading Filters in websheets, so let's say we have 3 dropdowns ( SUBNM ), one for Region Selection, one for City Selection and another one for Customer Selection
When User Selects Region, the next drop down ( Cities ) should show only Cities of that specific Region and same idea for Customer Drop down.
We have created the Region Attribute in the City dimension and Also City Attribute in the Customer Dimension.
We are using MDX Subsets to populate the dropdowns, but our customer dimension is huge now, more than 600K elements.
In order to use the selection made from user, we have created a 2-dimensional cube called User_Selection with following dimensions :
}Clients
User_Selection_m
and then the MDX statement for my_Custumers subset uses the stored value of City as following:
{FILTER( {TM1SUBSETALL( [Customer] )}, [Customer].[City] = [User_Selection].(StrToMember("[}Clients].["+USERNAME+"]"),[User_Selection_m].[City]))}
This is taking 90 seconds to refresh.
It takes the same amount of time if I just refresh the MDX statement in the subset editor
So I sent some time to troubleshoot the issue it looks like if I just hardcode the City Name in the MDX, then the MDX refreshes in 10 seconds
so the following MDX runs in 10 seconds
{FILTER( {TM1SUBSETALL( [Customer] )}, [Customer].[City] = "London")}
Also I tried removing the USERNAME from MDX by hardcoding the User Name in the MDX statement, just to see if this is part of issue and IT IS. So if I hardcode the User Name, MDX refreshes in 25 seconds. So the following MDX runs in 25 seconds
{FILTER( {TM1SUBSETALL( [Customer] )}, [Customer].[City] = [User_Selection].([}Clients].[Test_User],[User_Selection_m].[City]))}
We did not notice this issue when the dimension was having less elements ( around 30K elements )
Any idea why is this happening and is there any work around?
We need a mechanism that stores the User Selection and the selection needs to be used to filter other dimensions
Thanks