MDX 初学者问题
我的第一个问题很抱歉我的无知。我是 MDX 新手,但很难获得我需要的结果。我在物流仓库工作,想计算一些内部交货时间。
为此,我需要具有以下布局的输出:
订单 ID |首先运行状态名称 |日期和时间 |运行状态 名称 最后 |日期和时间 |销售数量
数据字段称为
- [OrderTable].[Order ID]
- [OrderRunState].[Run State Name]
- [Time Status History Created Date].[YQMD]
- [Clock Status History Created Date].[Time Minute]
- [Measure] .[销售数量]
- [时间状态历史记录创建日期].[YQMD] <- 用于过滤
现在有 2 个“但是”。
- 首先运行状态名称。我需要基于日期和时间的第一个 RSN时间,但此 RSN 不能等于“A”或“B”或“C”。
- 运行状态名称最后需要等于“F”。
为了让它更清楚一点,我制作了一个小的 Excel 表格来说明我的意思。
编辑:忘记添加我到目前为止所做的事情(请不要笑..很难;))。这不是我需要的,但我正在尝试逐步增加复杂性。
SELECT non empty
[Measures].[Sales QTY] on columns,
non empty
( [OrderTable].[Order ID].members,
[OrderRunState].[Run State Name].members,
[Time Status History Created Date.Y-Q-M-D].[Date].members,
[Clock Status History Created Date].[Time Minute].members )
on rows
FROM
[Operations]
WHERE
[Time Status History Created Date].[Yesterday].&[Yes]
仍需要添加日期和时间time 并具有“topcount”或“firstchild”之类的内容,但不包括 RSN A、B、C。
My first question here so sorry for my ignorance. I'm new to MDX but really struggling to get the results I need. I'm working in a logistics warehouse and would like to calculate some internal lead times.
For this I would need output with the following layout:
Order ID | Run State Name First | Date&Time | Run State Name Last | Date&Time | Sales QTY
The data fields are called
- [OrderTable].[Order ID]
- [OrderRunState].[Run State Name]
- [Time Status History Created Date].[Y-Q-M-D]
- [Clock Status History Created Date].[Time Minute]
- [Measure].[Sales QTY]
- [Time Status History Created Date].[Y-Q-M-D] <- used for filtering
Now there are 2 'buts'.
- Run State Name First. I would need the first RSN based on the date& time, but this RSN can't be equal to "A" or "B" or "C".
- Run State Name Last needs to be equal to "F".
To make it a bit clearer I've made a small Excel Table to illustrate what I mean.
EDIT: Forgot to add what I've done so far (please don't laugh..to hard ;)). It's not what I need but I'm trying to add complexity step by step.
SELECT non empty
[Measures].[Sales QTY] on columns,
non empty
( [OrderTable].[Order ID].members,
[OrderRunState].[Run State Name].members,
[Time Status History Created Date.Y-Q-M-D].[Date].members,
[Clock Status History Created Date].[Time Minute].members )
on rows
FROM
[Operations]
WHERE
[Time Status History Created Date].[Yesterday].&[Yes]
Still need to add date & time and have like "topcount" or "firstchild" but excluding RSN A,B,C.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论