In BAQ, How to retrieve only the latest transaction date row per partNum

Hello,

I am trying to create a baq that only retrieves the rows that contain the latest PartTran.TranDate entry, per PartNum.

I am not sure how to go about doing that. Is there anyone who can point me in the right direction on this?

I really appreciate the help.

Thanks,

Shawn

I already had this created, so I just exported it for you!

LastTransactionDate.baq (77.9 KB)

1 Like

Use the aggregate functions. Max(date), then group by everything else in the query.

1 Like

@lgraham

What you sent is close but I also need to bring in the ‘Tran-Type’ of the MAX (PartTran.TranDate) row without retrieving the other rows that have different 'Tran-Type’s, if that makes sense.

If I add in the field, I have to group by it which blows up the MAX (PartTran.TranDate) row retrieval.

How would I bring in the information of Tran-Type without messing the rest up?

Any help is appreciated.

Thanks,

Shawn