0

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'.

  1. 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".
  2. 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.

Excel Table Example

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.

Nard Cox
  • 1
  • 2
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Feb 26 '22 at 05:52
  • Anyone has any idea on how to get this solved, help would be greatly appreciated :) – Nard Cox Mar 03 '22 at 16:14
  • No one?? Too bad, still working on getting the solution I need but getting pretty frustrated. Bought an MDX Training on Udemy but will take some time before I can go through it all. – Nard Cox Mar 21 '22 at 15:29

0 Answers0