Page 1 of 1

Dynamic Filters in Cube Viewer

Posted: Fri Mar 02, 2018 2:52 pm
by Hector2005
Dear my friends, Really appreciated from your aid.

Sure I have a question :D :D , I use Planning Analytics 2.0 on a Windows OS.

Recently I have a problem Suppose I have dimension contains categories just (Consolidated elements), These consolidated elements will contains childs, These childs will be entered at run time through a TI process BUT they related to a another specific elements.

Suppose Dimension called Projects_Categories has the following:
+Development
+Exploration
+Design
+Digging


Suppose Dimensions called factory contains our factories names has the following:
Zalaia
Verich
Zefta


At run time I will add new projects specific to Locations under Projects_Categories. So I will insert new projects:
Zalaia --> Development --> P1
Zefta --> Development --> P2
Verich --> Design --> P3
Verich --> Exploration --> P4
Zalaia --> Exploration --> P5


When selecting Zalaia from factory filter, Cube Viewer should present the following:
-Development
P1
-Exploration
P5
+Design
+Digging

When Selecting Verich from factory filter, Cube Viewer should present the following:
+Development
-Exploration
P4
-Design
P3
+Digging

And So on...

I'm using Attribute to maintain the relationship between factory and Projects.

My Question is How can I make this view I searched and I found that we can use MDX in subset expression, I tried to do this

Code: Select all

{FILTER({TM1SubsetAll([Projects_Categories])},  [Projects_Categories].[Code] = [factory].[Code]}
Problems with the above code:
1- I can't show Parents such as Development with childs such as P1 in a right way,
I see P1
-Developemt
P1

2- When I need to rolling up or drilling down subset changes automatically.


Please I want Help..

Thanks a lot,
Best Regards,
Hector.

Re: Dynamic Filters in Cube Viewer

Posted: Sat Mar 03, 2018 10:09 pm
by Wim Gielis
I would use:

Code: Select all

{Hierarchize( Union( Filter( TM1FilterByLevel( TM1SubsetAll([Projects_Categories]), 1), [Projects_Categories].CurrentMember.Parent.Name = "" ),
FILTER({TM1SubsetAll([Projects_Categories])},  [Projects_Categories].[Code] = [factory].[Code]) ) )}

Re: Dynamic Filters in Cube Viewer

Posted: Sat Mar 03, 2018 10:11 pm
by Wim Gielis
The code attribute should only be filled in at level 0.
Attached a picture.

Re: Dynamic Filters in Cube Viewer

Posted: Mon Mar 05, 2018 11:03 am
by Hector2005
Wim Gielis wrote: Sat Mar 03, 2018 10:11 pm The code attribute should only be filled in at level 0.
Attached a picture.
Ohhhh my god, It's worked successfully. Actually I don't find any words present my feelings. Really Appreciated Sir ..

I have three questions:

1- Why when I drill down in Project_levels, Architect changes its subset to another subset ? If there is a solution I will be more more grateful.

2- Could you please give me your business mail, Really I want to know MVP like you? :)

3- Could you please give me a powerful paper at the same time it is simple enough to study and learn MDX queries?

thanks a lot,
My Best Regards.
Hector.

Re: Dynamic Filters in Cube Viewer

Posted: Mon Mar 05, 2018 11:35 am
by Wim Gielis
Hector2005 wrote: Mon Mar 05, 2018 11:03 am Ohhhh my god, It's worked successfully. Actually I don't find any words present my feelings. Really Appreciated Sir ..

I have three questions:

1- Why when I drill down in Project_levels, Architect changes its subset to another subset ? If there is a solution I will be more more grateful.

2- Could you please give me your business mail, Really I want to know MVP like you? :)

3- Could you please give me a powerful paper at the same time it is simple enough to study and learn MDX queries?

thanks a lot,
My Best Regards.
Hector.
You are welcome.

1 - this is by design, no solution possible
2 - an autograph is for free, the material on my website too. For anything else you'll have to pay :-)
3 - http://www.wimgielis.com/tm1_mdxstatements_EN.htm

Wim

Re: Dynamic Filters in Cube Viewer

Posted: Mon Mar 05, 2018 11:48 am
by Hector2005
Wim Gielis wrote: Mon Mar 05, 2018 11:35 am
Hector2005 wrote: Mon Mar 05, 2018 11:03 am Ohhhh my god, It's worked successfully. Actually I don't find any words present my feelings. Really Appreciated Sir ..

I have three questions:

1- Why when I drill down in Project_levels, Architect changes its subset to another subset ? If there is a solution I will be more more grateful.

2- Could you please give me your business mail, Really I want to know MVP like you? :)

3- Could you please give me a powerful paper at the same time it is simple enough to study and learn MDX queries?

thanks a lot,
My Best Regards.
Hector.
You are welcome.

1 - this is by design, no solution possible
2 - an autograph is for free, the material on my website too. For anything else you'll have to pay :-)
3 - http://www.wimgielis.com/tm1_mdxstatements_EN.htm

Wim
Appreciated Sir, I will see it seems interested.
Please I have a question: Sorry I know that I did many but I still junior.

I need to add parent to all project levels and its appear with each factory too Ex: Zalaia factory.

-Total Projects
-Development
P1
-Exploration
P5
+Design
+Digging

thanks a lot,
Appreciated Sir.

Re: Dynamic Filters in Cube Viewer

Posted: Mon Mar 05, 2018 12:24 pm
by Wim Gielis
Then the first part of the MDX needs to be changed.
Use DrillDownLevel, an example is listed on my website on that page.

Re: Dynamic Filters in Cube Viewer

Posted: Mon Mar 05, 2018 1:10 pm
by Hector2005
Wim Gielis wrote: Mon Mar 05, 2018 12:24 pm Then the first part of the MDX needs to be changed.
Use DrillDownLevel, an example is listed on my website on that page.
Thanks Sir, But It seems that I want to read all instructions to solve that, If you can help me speed up this by solving it. I will be appreciated.

Sorry Sir, I know that this makes you nervous. :(

Re: Dynamic Filters in Cube Viewer

Posted: Mon Mar 05, 2018 1:11 pm
by tomok
Hector2005 wrote: Mon Mar 05, 2018 11:03 am 1- Why when I drill down in Project_levels, Architect changes its subset to another subset ?
In the subset editor, when you click on the plus or minus sign to drill up or down, TM1 accesses the entire dimension to determine what the resulting set should be after the drill down or collapse, not just what was in the subset when you started. This question gets asked usually once a month. Unfortunately, that's just the way it works. To accomplish what you want you would need to change the actual dimension via custom hierarchies.

Re: Dynamic Filters in Cube Viewer

Posted: Mon Mar 05, 2018 8:41 pm
by Wim Gielis
Hector2005 wrote: Mon Mar 05, 2018 1:10 pmSorry Sir, I know that this makes you nervous. :(
Correct.

This is a matter of copy/paste, I already directed you to the solution on a web page with the expression that you need to use.

Re: Dynamic Filters in Cube Viewer

Posted: Wed Mar 07, 2018 8:17 am
by Hector2005
tomok wrote: Mon Mar 05, 2018 1:11 pm
Hector2005 wrote: Mon Mar 05, 2018 11:03 am 1- Why when I drill down in Project_levels, Architect changes its subset to another subset ?
In the subset editor, when you click on the plus or minus sign to drill up or down, TM1 accesses the entire dimension to determine what the resulting set should be after the drill down or collapse, not just what was in the subset when you started. This question gets asked usually once a month. Unfortunately, that's just the way it works. To accomplish what you want you would need to change the actual dimension via custom hierarchies.
Thanks a lot, Appreciated sir for this info.

Re: Dynamic Filters in Cube Viewer

Posted: Wed Mar 07, 2018 8:19 am
by Hector2005
Wim Gielis wrote: Mon Mar 05, 2018 8:41 pm
Hector2005 wrote: Mon Mar 05, 2018 1:10 pmSorry Sir, I know that this makes you nervous. :(
Correct.

This is a matter of copy/paste, I already directed you to the solution on a web page with the expression that you need to use.
any way I want to thank you sir, you are right, I got it.