Filter a cube view based on the dimension element

Post Reply
Posts: 3
Joined: Fri Jun 02, 2017 6:35 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Filter a cube view based on the dimension element

Post by AskAndAnswer » Wed Sep 06, 2017 12:30 am

Here are the cube's dimensions:
Month (with an input element)
Items (1 to 20)

Measure dimension has the following elements:
Employee ID
New Employee
Start Date
End Date

New Employee element is a flag with Yes/No picklist that is loaded into the input field of Month dimension.

Now the issue. When I create a cube view, I have all the measures displayed. The view will be for input month, one year and one version with departments and items as row dimensions and measures as column dimensions. How do I filter this view to see only new employees? In other words, is there a way to filter a view based on the "Yes" value in the New Employee measure?

User avatar
Posts: 521
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: PAL 2.0.1
Excel Version: 2016 64-bit
Location: JHB, South Africa

Re: Filter a cube view based on the dimension element

Post by gtonkin » Wed Sep 06, 2017 5:35 am

The problem is that you are going to have combinations of Department and Item and by filtering on only item, you will end up with a list of items where and Employee may be marked as New but not for that department. If you are only ever working with one department then the below may work for you:
Try something like this on the Items dimension:

Code: Select all

[CubeName].([Year].[2017],[Version].[Budget],[Department].CurrentMember,[Month].[#Input],[Measures].[New Employee])="Yes"
For Department, you would need to set to the relevant element if CurrentMember in the cube view does not work for your requirements
If you are using this in an active form, you can update the elements by joining the values from your selection criteria within the form. If using in cube views, you may want to create subsets with the relevant elements e.g. Year with a subset of Current Year and one element of 2017 then refer to that in the MDX e.g.
TM1Member([Year].[Current Year].Item(0),0) instead of [Year].[2017]
HTH-have not been able to test the syntax but hopefully the concept works.

Post Reply