[Forum FAQ] The difference between FILTER, WHERE clause and Subselect in MDX RRS feed

  • General discussion

  • Introduction

    Generally, you can get the same result in different ways in Multidimensional Expression (MDX). For example, you can restrict the returned data by using FILTER function, WHERE clause or Subselect. Please refer to the screenshots below.

    FILTER function

    WHERE clause


    In this article, I will explain what’s the difference between FILTER function, WHERE clause and Subselect.


    Firstly, you can refer to links below to get the basic knowledge about FILTER function, WHERE clause and Subselect.

    Difference between FILTER function and WHERE clause

    Difference between Where clause and Subselect

    Subselects and the Where clause do two different things. They're not interchangeable in all circumstances, they may return different results, and sometimes one performs better, sometimes the other does, because they may result in different query plans being generated. One technique is not consistently better than the other on all cubes.
    Here is a blog which describe the difference between WHERE clause and Subselect detail, please refer to the link below.

    Applies to

    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012


    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    • Edited by ForumFAQ Thursday, July 31, 2014 7:51 AM
    Thursday, July 31, 2014 7:47 AM