[英]What is the correct syntax for an MDX Filter Expression when using MTD and QTD functions in SSRS/SSAS Query Designer?
Having used the Query Designer in BIDS to type in straight MDX queries I am now attempting to create similar queries but using the graphical drag-and-drop GUI interface instead. 在BIDS中使用查询设计器键入直接的MDX查询后,我现在尝试创建类似的查询,但改用图形化的拖放式GUI界面。
However I am having trouble specifying a syntactically correct MDX filter expression for returning all the MTD and QTD dates. 但是,我在指定语法上正确的MDX过滤器表达式以返回所有MTD和QTD日期时遇到麻烦。
Here is what I have tried so far: 到目前为止,这是我尝试过的:
MTD([dimTime].[Hierarchy].[Day Key].currentmember)
MTD([dimTime].[Hierarchy].currentmember)
MTD()
Each one in turn parses correctly but returns no rows. 每一个依次正确解析,但不返回任何行。
The filter is set up as follows: 过滤器设置如下:
Dimension = Time
Hierarchy = Hierarchy
Operator = MDX
MDX = (see the three examples I tried above)
As I understood you want to obtain list of dates like a String? 据我了解,您想获取像String这样的日期列表?
"...expression for returning all the MTD and QTD dates."
“ ...用于返回所有MTD和QTD日期的表达式。”
So, you can use function SetToStr: 因此,您可以使用SetToStr函数:
SetToStr(MTD([dimTime].[Hierarchy].[Day Key].currentmember))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.