BAQ to show last 3 closed jobs for each active part

Brilliant thank you

1 Like

Iā€™m very glad I found this post as I have been trying to do the same.

However, I am unable to import the BAQ example due to software version(?)

Anyway, can someone tell me where the <=3 is supposed to go? I am using the BAQ Designer.

Any help would be appreciated!

Does anyone have any feedback for me concerning my question as to where the
<=3 goes when using BAQ Designer?

Thank you!

Right here.

Thank you - I didnā€™t know I could do that, opens up a whole new world for me!

ummmā€¦one more questionā€¦

Iā€™m, receiving duplicate records, example:
10007 3683 2
10007 3683 3

10007 4081 2
10007 4081 3

I have tried a myriad of things to stop this but obviously I missing something.

Is there a ā€œRule of Thumbā€ that I should keep in mind when something like this happens?

Well, they arenā€™t duplicates. 3683 is not the same as 4081. So whatever those numbers are, Iā€™m assuming that you are trying to ignore them? Is 10007 your part numbers? And 3683, 4081 your job numbers?

I donā€™t really know what you have in your BAQ, but a swag would be that your partitioning in the windowing function isnā€™t right. If you want to rank by part number, your partition needs to be by part number. If you have part number and job number, then it will separate by part number and job number.

Okay, that makes sense - I will look into thatā€¦
10007 Part Number
3683 Job Number
4081 Job Number

Sorry, I thought you could read my mind :thinking:

Iā€™m trying really hard! But yeah, some screen shots and explanation of what you have so far would go a long way. You might even figure it our yourself just by trying to explain it.

Did you watch the video linked above about windowing functions?

Not yet and I do plan to.

As you advisedā€¦I had to partition on Job, I was partitioning on Part. Once I cleaned that up it worked like a charm.

I thank you for your patience - and as always, I am grateful for your help, Iā€™ve learned so much!