Forum Discussion
Selecting Earliest Working Date from Date Table Based on Shipping Time
- 5 years ago
Hi, Anonymous
Sorry, I thought what you need is the same result, so I made a wrong change in the measure. Just need to modify the measure, the correct result should be like this:
Column = VAR a = ADDCOLUMNS ( 'Dim Date Table', "aa", RANKX ( FILTER ( ALL ( 'Dim Date Table' ), [Is Working Day] = 1 && [Date] >= Orders[Order Date] ), [Date], , ASC ) ) RETURN MAXX ( FILTER ( a, [aa] = [Processing Time] ), [Date])Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your help, Janey. Unfortunately it returned the same results. I ended up implemented a solution in SQL which was a little more intuitive for me.
Hi, Anonymous
Sorry, I thought what you need is the same result, so I made a wrong change in the measure. Just need to modify the measure, the correct result should be like this:
Column =
VAR a =
ADDCOLUMNS (
'Dim Date Table',
"aa",
RANKX (
FILTER (
ALL ( 'Dim Date Table' ),
[Is Working Day] = 1
&& [Date] >= Orders[Order Date]
),
[Date],
,
ASC
)
)
RETURN
MAXX ( FILTER ( a, [aa] = [Processing Time] ), [Date])Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
Yep that did the trick, Janey - thank you so much!