Lookup being weird might be me being stupid

So I have a formula for a column to grab the associated District_ID to my requisition. When Iโ€™m using a lookup I get 1 which is incorrect but if I use ANY(SELECT()) I get 2 which is correct.
Am I just being stupid that these 2 formulas are not semantically the same? I even added a [_THISROW] to my lookup and still got the wrong value.

LOOKUP([REQUISITION_ID],โ€œREQUISITIONโ€,โ€œREQUISITION_IDโ€,โ€œDISTRICT_IDโ€)

ANY(SELECT(REQUISITION[DISTRICT_ID], [REQUISITION_ID]=[_THISROW].[REQUISITION_ID]))

Solved Solved
0 3 147
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

This:

LOOKUP([REQUISITION_ID],โ€œREQUISITIONโ€,โ€œREQUISITION_IDโ€,โ€œDISTRICT_IDโ€)

is equivalent to this:

ANY(SELECT(REQUISITION[DISTRICT_ID], ([REQUISITION_ID] = [REQUISITION_ID])))

which is equivalent to this:

ANY(SELECT(REQUISITION[DISTRICT_ID], TRUE))

which is equivalent to:

ANY(REQUISITION[DISTRICT_ID])

View solution in original post

3 REPLIES 3

Steve
Platinum 4
Platinum 4

This:

LOOKUP([REQUISITION_ID],โ€œREQUISITIONโ€,โ€œREQUISITION_IDโ€,โ€œDISTRICT_IDโ€)

is equivalent to this:

ANY(SELECT(REQUISITION[DISTRICT_ID], ([REQUISITION_ID] = [REQUISITION_ID])))

which is equivalent to this:

ANY(SELECT(REQUISITION[DISTRICT_ID], TRUE))

which is equivalent to:

ANY(REQUISITION[DISTRICT_ID])

Coulda sworn I put the [_THISROW] in my formulas and they werenโ€™t workingโ€ฆnow they do and the initial formula is now working because I have the correct formula as wellโ€ฆI guess I just know nothing and need a break.

Been there, done that.

Top Labels in this Space