Forum Discussion
sboobar
3 years agoFrequent Visitor
First Production Date across Category
I am trying to find the date that first production of any kind (green>0 or red>0) occurred for an item and to assign that date across the category item #. Below is a sample set of my data and a column showing the expected results I hope to get. Please help!
| Date | Item # | Green | Red | Expected Results (First Prod Date) |
| 1/1/2023 | 1 | 0.00 | 0.00 | 1/3/2023 |
| 1/2/2023 | 1 | 0.00 | 0.00 | 1/3/2023 |
| 1/3/2023 | 1 | 8.00 | 4.00 | 1/3/2023 |
| 1/4/2023 | 1 | 3.00 | 75.00 | 1/3/2023 |
| 1/1/2023 | 2 | 19.00 | 44.00 | 1/1/2023 |
| 1/2/2023 | 2 | 0.00 | 0.00 | 1/1/2023 |
| 1/3/2023 | 2 | 24.00 | 46.00 | 1/1/2023 |
| 1/1/2023 | 3 | 0.00 | 0.00 | 1/2/2023 |
| 1/2/2023 | 3 | 17.00 | 17.00 | 1/2/2023 |
hi sboobar
try like:
Column =MINX(FILTER(TableName,TableName[Item]= EARLIER(TableName[Item] )&&TableName[Green]<>0&&TableName[Red]<>0),TableName[Date])
3 Replies
- sboobarFrequent Visitor
This worked! Thanks!
- sboobarFrequent Visitor
How would this same formula work if the two columns that needed to be <> 0 came from two different tables? For example I still need the first date of production between red or green of an item but those columns are in the two tables {see below}. The tables are already joined by an index in the model
TABLE 1 Date Item Green 1/1/2023 1 7 1/2/2023 1 545 1/3/2023 1 68 1/1/2023 2 21 1/2/2023 2 547 1/3/2023 2 85 1/1/2023 3 312 1/2/2023 3 0 1/3/2023 3 4 TABLE 2 Date Item Red 1/1/2023 1 5 1/2/2023 1 64 1/3/2023 1 12 1/1/2023 2 78 1/2/2023 2 92 1/3/2023 2 41 1/1/2023 3 2 1/2/2023 3 7 1/3/2023 3 7