This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
How can I put a filter in workflow so that only line items for end user code and material code for the last three months are filtered/ picked. I have the data for the entire 2018 in below tabular format.
Eg: For customer AA and Mat code as BB, line items for fiscal period 201809, 201811, 201812 should be filtered.
Similarly, for customer AA and Mat code as CC, line items for the month 201807, 201808 and 201810 should be filtered.
Tried using multi row formula but could not achieve the desired results.
I'd take @JoBen 's approach of a sort with a sample tool. Easiest way to go. If you also need to include the customer code, just tick that off in the sample tool
But, if you'd like to play with the multi-row formula tool and a filter, try this approach
The summarize tool counts how many records are for each Mat Code. Join that information back to the original data, and then sort. The multi-row formula tool gives a new record ID within each Mat Code, starting with 1 and ending with the last (3 for BB, 9 for CC). Then filter out where the count minus the row ID is less than 3 - this gives the last three.
You can tweak the sort and the Multi-row tool to account for the Customer ID as well (just add Customer ID as the first sorting level, and in the Multi-row tool, group by customer ID and by Mat Code)