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 146
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