最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

olap - How does the MDX GENERATE function work with sets? - Stack Overflow

programmeradmin5浏览0评论

I am currently studying MDX language to query data in Cube. While reading the documentation for the MDX GENERATE function, I encountered some confusion about how it works.

Here is some context about my Cube structure:

  1. This is Measures table:

 2\. **This is dimension Payment_Dim:**

Query 1:

// test 1
select generate(
    [Payment Dim].[Payment Type].[Payment Type].MEMBERS,
    {[Measures].[Tip Amount]}
) on 0
from [Taxidb]

Result:

Query 2:

// test 2
select generate(
    [Payment Dim].[Payment Type].[Payment Type].MEMBERS,
    {([Payment Dim].[Payment Type].currentmember, [Measures].[Tip Amount])}
) on 0
from [Taxidb]

Result:

I would like to understand:

  1. What is the difference between the two queries?

  2. How does the GENERATE function behave differently when using [Measures].[Tip Amount] versus ([Payment Dim].[Payment Type].CURRENTMEMBER, [Measures].[Tip Amount])?

Thank you so much for your help!

发布评论

评论列表(0)

  1. 暂无评论