Filter Dimension based on Another Dimension

Post Reply
tm1green
Posts: 22
Joined: Tue Mar 31, 2015 9:54 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Filter Dimension based on Another Dimension

Post by tm1green »

Hi there,

I have the following dimensions:

Positions dimension

Total Position
--010-123 Engineering
--ENG001 Engineer
--ENG070 Manager
--020-124 Information Technology
--IT001 Analyst
--IT070 Manager

Departments dimension

Total Company
--010 General Office
--010-124 Information Technology
--020 R&D
--020-123 Engineering

I have an attribute created in both Positions and Departments dimensions which contains the department code only like 010-0123 and 020-124. I managed to filter Positions dimension based on Departments dimension as follows,

({FILTER( {TM1SubsetAll( [m_Positions] )}, [m_Positions].[Department] = [h_Departments].[Department Code])})


However, I don't get the "Total Position" in the Positions dimension this way as it does not tied to department code.

How do I filter and get the "Total Position" at the same time?

Thanks in advance.
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Filter Dimension based on Another Dimension

Post by declanr »

Union.
Declan Rodger
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: Filter Dimension based on Another Dimension

Post by BariAbdul »

"You Never Fail Until You Stop Trying......"
mvaspal
Community Contributor
Posts: 341
Joined: Wed Nov 03, 2010 9:16 pm
OLAP Product: tm1
Version: 10 2 2 - 2.0.5
Excel Version: From 2007 to 2013
Location: Earth

Re: Filter Dimension based on Another Dimension

Post by mvaspal »

{
{[m_Positions].[Total Position]}
,
{FILTER( {TM1SubsetAll( [m_Positions] )}, [m_Positions].[Department] = [h_Departments].[Department Code])}
}

should also work
tm1green
Posts: 22
Joined: Tue Mar 31, 2015 9:54 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: Filter Dimension based on Another Dimension

Post by tm1green »

Thanks guys. It works perfectly. :)
Post Reply