Forum Discussion
redhughes
7 years agoHelper II
MAX date IF
I have a table with "Date added" and "Week commencing", and I'd like to find the max Date added for each Week commencing:
| Date added | Week commencing | Value |
| 29/07/2019 | 29/07/2019 | 10 |
| 29/07/2019 | 05/08/2019 | 20 |
| 29/07/2019 | 12/08/2019 | 50 |
| 01/08/2019 | 29/07/2019 | 20 |
| 01/08/2019 | 05/08/2019 | 40 |
| 01/08/2019 | 12/08/2019 | 100 |
So in this example the first line should have a max Date added of 01/08/2019. What's the best way of doing it - Query Editor or adding a new column to the table, and what formulas/functions can I use? thanks a lot for your help!
Hi redhughes
If you want to add a new column to the table:
NewColumn = CALCULATE ( MAX ( Table1[Date added] ), ALLEXCEPT ( Table1, Table1[Week commencing] ) )