# Database Discussions > MDX and Analysis Services >  How To Filter within MDX Calculated Member within BI Studio

## jkears

Hi,
I have a calculated member that I defined within BI Studio within the Calculated Members dialog. 

The calculated member works but I need to add a filter to contrain by a related Skill Dimension however I am new to MDX and am struggling with how to write this within the Visual Studio Calculated Member interface.

Here is the existing (working but needs to be filtered);

*iif(([Measures].[ABNCALLS] + [Measures].[ACDCALLS]) <> 0,([Measures].[ACCEPTABLE] - [Measures].[SLVLABNS]) / ([Measures].[ABNCALLS] + [Measures].[ACDCALLS]),0)*

I need to append a filter somewhat like the following to filter out all but SkillName1 ...

Filter (
[Dim Skills].[SkillName].Members, 
[Dim Skills].[SkillName] = [[Dim Skills].[SkillName].&[SkillName1]
)

How do I do this within Visual Studio Cube Calculated Member interface?

Thanks in advance!

----------


## Island1

You simply wrap your existing calculated member's syntax within the MDX Filter() function.  See my article  Basic Set Functions: The Filter() Function here at _Database Journal_ for details surrounding the function (I also use it in numerous other articles in my MDX Essentials Series and elsewhere).

Get back to me with any specific followup questions as you encounter them - it often helps to restate your issues within the Adventure Works sample environment, so that we can provide you with specific code that works, which you can then extrapolate to your "real world" environment (which we, of course, cannot access ...).

Good Luck!

Bill

----------


## predi

Hi, your article actually does not answer this question.
I have the same issue. 
Filter function accepts two arguments - set and condition. So what do you mean wrap it up?
The question is: Where do I put the measure itself? Should it be:
1) FILTER(SET, CONDITION, MEASURE) 
2) FILTER (MEASURE,SET,CONDITION) 
3) FILTER(SET,CONDITION),MEASURE

what is the syntax?

----------

