expression return wrong

why this expression below is giving a wrong result:

IF([New Delivery]=TRUE,
ANY(SELECT(DELIVERY[Check Number],
[Timestamp]=
MAX(Select(DELIVERY[Timestamp],[BRANCH]=[_THISROW].[GS BRANCH])))),

Any(Select(Order Details[Check Number],[Timestamp]=MAX(
SELECT(
Order Details[Timestamp],
[Product Name]=[_Thisrow].[Product Name]))
)
))

 

supposed result is (highlight in yellow)

pangalawang_0-1648956513866.png

but it is giving me this instead:

pangalawang_1-1648956887217.png

seems something is giving the timestamp off

0 4 79
4 REPLIES 4

Welcome to the community!

First, try this:

IF([New Delivery]=TRUE, 
  ANY( SELECT(DELIVERY[Check Number], AND(
         [BRANCH] = [_THISROW].[GS BRANCH],
    [Timestamp] = MAX(DELIVERY[Timestamp])
  ))),
  ANY( SELECT(Order Details[Check Number], AND(
    [Product Name] = [_Thisrow].[Product Name],
    [Timestamp] = MAX(Order Details[Timestamp])
  )))
)

Hi,

I Tried, didn't work. It also not get the else condition right.

with max select combo, I was able to get the else condition right, now it doesn't.

 

I have looked at the Key Values it is getting and the max expression is getting the earliest time of timestamp:

This is a bit confusing. wondering what is throwing the timestamp off.

pangalawang_1-1649032258942.png

 

Hello,

Please show the results of the expression from the expression assistant, and indicate what result you'd expect and how it differs from the expression's result. Thanks

I have regenerated and it went Ok. don't know why. thanks anyways.

Top Labels in this Space