Page 1 of 1

TI view wizard filters by code?

Posted: Mon Sep 18, 2017 11:02 am
by st2000
I'm looking for the value filtering options offered in TI when assigning the data source, but without defining them via GUI.
I want to perform the filtering of vaules when defining the whole view, which I'm doing anyway by code in Prologue.
I mean these options here:
TI_Datasource_CreateView_FilteringOptions.png
TI_Datasource_CreateView_FilteringOptions.png (20.18 KiB) Viewed 4163 times
The checkboxes to the left -I guess- are the GUI equivalents to ViewExtractSkip... functions. But for the "operators-list" to the right I'm a little bit puzzled about to recognize which functions could be their counterparts for scripting. :?

Has somebody a hint for me? :)

Re: TI view wizard filters by code?

Posted: Mon Sep 18, 2017 12:29 pm
by tomok
The answer is to write an MDX query that does the filtering you want, assign that to a subset and use that subset in a view that is ultimately your data source. If you haven't read it yet, I recommend you spend time reading the MDX Primer to learn all the different ways you can filter subsets. You're going to have to expand your horizons and go beyond the TI Wizard through.

Re: TI view wizard filters by code?

Posted: Mon Sep 18, 2017 4:12 pm
by st2000
This was my first thought, too. As I did it with MSAS or (indirect) in Cognos BI.
But with TM1 I always encountered MDX together with dimensions/subsets (and when extracting data from ODBO). So I already derived dynamic subsets via MDX inside a dimension (also used the MDX primer to learn how to do it with TM1 specifics...). But I miss something like the subset editor's expression window for the cube viewer. Maybe I think about that more complicated than needed.
If I want to retrieve cell data (for example all cells from a view which have a value >= 3), should I use the subseteditor for the cube's measure-dimension and write the whole MDX concerning all the other dimensions, too, into the measures' subset definition?

Re: TI view wizard filters by code?

Posted: Mon Sep 18, 2017 11:41 pm
by Wim Gielis
Hello,

If you are on Planning Analytics, check out this function: ViewCreateByMDX

https://www.ibm.com/support/knowledgece ... bymdx.html

Does this help ? I did not play around with the function yet.

Re: TI view wizard filters by code?

Posted: Tue Sep 19, 2017 10:19 am
by st2000
This is, what I was seeking for. Unfortunately I am on 10.2.0 actually, but this is really a remarkable feature.
The link didn't work for me, this one (shortened) leads to the description: https://ibm.co/2fx0FYn
This I will check out first when going to PA 2.0 :)

To filter values with oldschool MDX I need to define that filter into the subset editor of the measure dimension and adress there the complete cube (all dimensions I want to have restrictions), did I get this right?

Re: TI view wizard filters by code?

Posted: Tue Sep 19, 2017 11:16 am
by Wim Gielis
Why not do the filtering in the Data tab of the process ?
And the Prolog tab contains a larger view (unfiltered).