Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In the below table, I have to check for each GrpID, if there is D between 2010 and 2015. If there is a D then print the corresponding ID if not then print the ID for 2015.
| Year | Grp ID | ID | Code |
| 2009 | 80726806 | 1234 | BB |
| 2010 | 80726806 | 1235 | BB |
| 2011 | 80726806 | 1236 | D |
| 2012 | 80726806 | 1237 | BB |
| 2013 | 80726806 | 1238 | BB |
| 2014 | 80726806 | 1239 | BB |
| 2015 | 80726806 | 1240 | BB |
| 2009 | 80726813 | 1241 | BB |
| 2010 | 80726813 | 1242 | B |
| 2011 | 80726813 | 1243 | B |
| 2012 | 80726813 | 1244 | B |
| 2013 | 80726813 | 1245 | BB |
| 2014 | 80726813 | 1246 | B |
| 2015 | 80726813 | 1247 | BB |
| Grp ID | ID |
| 80726806 | 1236 |
| 80726813 | 1247 |
How do I do that? TIA.
May be this:
=Alt(Only({<Year = {2010, 2011, 2012, 2013, 2014, 2015}, Code = {'D'}>}ID), Only({<Year = {2015}>}ID))
May be this:
=Alt(Only({<Year = {2010, 2011, 2012, 2013, 2014, 2015}, Code = {'D'}>}ID), Only({<Year = {2015}>}ID))
Hi,
depending on your requirements (2015 = Max(Year)?) another solution might be:
hope this helps
regards
Marco