I am trying to pull the Last sale date of a part. The Last Sale Date could be a MFG-CUS or a STK-CUS. I understand how to create the calculated field and the subquery but what I cannot figure out is how to say:
Pull the LAST Tran Date be it for MFG-CUS or STK-CUS but not both.
Seems so easy, but I feel I have tried every way I can think of but am not getting the results I’m expecting.
OMG - I figured it out! It was because I was having the subquery list the Trantype and Trandate instead of letting the calculated fields return those transactions.
When I took out PartTran.TranType and PartTran.TranDate, I received the expected results.
Thank you for your responses - I really appreciate your help!
Well…I thought I had it but found that it was returning incorrect dates. It is pulling one date for some parts, but for other parts it seems to be pulling multiple random dates.
Thank you for your wonderful example - I’ve set up the Subquery as recommended. On the Top Level I have the table “Part” as I am asking for only manufactured parts and that I don’t want certain part numbers included in the result.
I am connecting the SubQuery to Parts using PartNum.
I am still receiving multiple “LastTranDates” for a single part - oh, and I am grouping by PartNum.
Wow - looking good so far. I learned some finite details that I wasn’t making. Seems that I had the correct choices but did not have them pulling in the correct order.
I’m going to review the results to verify I have what I need. I’ll mark this as solved as soon as I check my results - but looks great so far!