The difference between filter and exist in MDX

Source: Internet
Author: User

Get a collection that is typically used to filter out a custom set, such as a restaurant in China

The set returns all products that are msdnteam under and recorded on the fact thread metric.

Implemented with exists

Select

Exists (

[Dim Queue]. [Product-queue]. Members,

[Dim Engineer]. [Team-engineer]. [Team NAME].&[MSDN],

"Fact Thread"

)

On 0 from Palladium

Implemented with filter

Select

Filter

(

([Dim Engineer]. [Team-engineer]. [Team Name].&[msdn],[dim Queue]. [Product-queue]. Members),

[Measures]. [Incoming thread number] > 0

)

On 0 from Palladium

The set returned by filter has two levels, and the queue and team

The set returned by exists is only the queue level. The result set returned by exist is relatively clean.

But the disadvantage of exists is that it can only be judged whether a measure group has a value in this dimension, but not a specific value.

If many of us filter on specific values and just want to return a set of one dimension, we need to synthesize both approaches.

Select

Filter (

Exists (

[Dim Queue]. [Product-queue]. Members,

[Dim Engineer]. [Team-engineer]. [Team NAME].&[MSDN]

, "Fact Thread"

)

, [Measures]. [Incoming thread number] > 0

)

On 0 from Palladium

I hope this article will help you.

The difference between filter and exist in MDX

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.