简体   繁体   中英

MDX Help SSRS Query Designer MDX Calculated Member & MDX Operator Filter Expression

I have 2 questions in the SSRS Query Designer for my SSAS tabular model. I create a calculated Member column that basically says, IF this other column = "Last Invoice Date", put "Last Invoice Date" as the value, otherwise, put a different column's value in, "FiscalMonthLastDay":

IIF([Invoice Date].[Relative Date].CurrentMember.MEMBER_CAPTION ="Last Invoice Date", "Last Invoice Date", [Invoice Date].[FiscalMonthLastDay].CurrentMember.MEMBER_CAPTION)

When i drag that new field in, it works but its creating extra rows in my results. I added before & after screen shot (erased some sensitive data). I can't figure out how to get it to not show the extra rows?

Before: 在此处输入图片说明

After:

在此处输入图片说明

My 2nd question is, i would then like to filter my data set to only where this new calculated member matches another column. So I am doing the MDX operator in the filters section and thought something like this would work, but i can't get it to (its the same formula as above):

在此处输入图片说明

If anyone knows where to get some good examples of how this MDX operator is used, that would be great !

Thanks !

I don't understand this:

[Invoice Date].[Relative Date].CurrentMember.MEMBER_CAPTION ="Last Invoice Date"

Looking at your screenprints [Relative Date] is a date - so how can MEMBER_CAPTION be equal to "Last Invoice Date" ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM