Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am having difficulty in writing an expression for heirarchy.
The requirement is, I have a heirarchy (having 4 dimensions - zone, state, district,office) as my dimension in the (treemap) chart. I have to write an expression for sales in such a way that for Zone and state sales will be in TMT which is sum(sales)/1000 and for district and office sales will be in MT which is sum(sales). Problem is how to split this Heirarchy in expression editor.
Let me know if you have any idea to get this.
Thanks!
You Can create a variable which holds the value you want to divide.
Say for example vDivide
vDivide = If(Getselectedcount(Office)>=1,1, If(Getselectedcount(District)>=1,1,1000))
Now divide your expression with variable
Sum(Sales)/$(vDivide)
Regards,
Kaushik Solanki
Hi,
When you say Hierarchy, is it that you have created a drill down dimension? or you have 4 different dimensions?
Regards,
Kaushik Solanki
Its a drill down dimension.
You Can create a variable which holds the value you want to divide.
Say for example vDivide
vDivide = If(Getselectedcount(Office)>=1,1, If(Getselectedcount(District)>=1,1,1000))
Now divide your expression with variable
Sum(Sales)/$(vDivide)
Regards,
Kaushik Solanki