2 Replies Latest reply on Nov 13, 2015 11:46 AM by Al Reynolds

# Use Lookup function or LOD Calc?

Hey Guru's

Need a hand here. Trying to do a simple calc but cant get the syntax right.

Using conditional logic to determine if there is a  conditional "Match" in my data and at what level the match is, for example

If [SHIPMENT:LANE_ID])=[RATE: LANE_ID]) then 'SHIPPED AGAINST CONTRACT - EXACT MATCH'

ELSEIF  [SHIPMENT:LANE_ID]= < [RATE: LANE_ID] ANYWHERE IN MY TABLE > then 'SHIPPED AGAINST CONTRACT - PARTIAL MATCH'

ELSE 'OUT OF CONTRACT'

END

So First if is at row level. If there is a row match is perfect,

second IF is if there is a match IN ANY ROW  in my table , then we have a partial match,

else there is no match

Do i use LOOKUP ? a LOD Calc?

Cant quite get right.

Al

• ###### 1. Re: Use Lookup function or LOD Calc?

Sounds like LOD but would probably need to know more.

Lookup is forced to used the level of detail that is on the viz.  So, by your first condition, you would have to have the lowest level of detail on the viz.

How you're presenting your data (What level of detail) is important for this question.

Do you have example workbook and some sort of mockup of what you want the end result to look like?

• ###### 2. Re: Use Lookup function or LOD Calc?

HI Aaron

Thanks for response. here is a sample dataset (very dumbed down)

I would like to visualise a bar chart using a COUNTD on the shipment number (this shows the number of shipments our company has moved) with colour coding on the shipments showing % directly linked to a contract, or can be linked to a similar contract or there is no possible match.

DIRECT LINK is WHERE S.LANE_ID=R.LANE_ID at row level (I marked in green in the XLS)

SIMILAR LINK is WHERE S.LANE_ID = R.LANE_ID but match can be present anywhere in R.LANE_ID column (I marked in Orange in the XLS)

NO LINK is where S.LANE_ID does not have a match anywhere (I marked in grey in the XLS.)

Hope this makes sense?