Hello
Below is sample of my table that I have in a PowerPivot model. What I'm trying to do is return the most recent "Code" associated with the particular "OrderNbr". I need this calculation as a calculated column because I'm going to use this calculated column as a filter. It gets tricky because I have some orders with the same date and unfortunately it's only at a Date level, my data doesn't include a time as well. Can this be done? Any help would be great!
Please note my data isn't sorted like the below, it is sorted randomly.
<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>
<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>
Below is sample of my table that I have in a PowerPivot model. What I'm trying to do is return the most recent "Code" associated with the particular "OrderNbr". I need this calculation as a calculated column because I'm going to use this calculated column as a filter. It gets tricky because I have some orders with the same date and unfortunately it's only at a Date level, my data doesn't include a time as well. Can this be done? Any help would be great!
Please note my data isn't sorted like the below, it is sorted randomly.
<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>
Date | OrderNbr | Value | Code |
1/28/2016 | 39441 | $49.00 | MAN |
1/22/2016 | 39989 | $38.00 | RES |
1/28/2016 | 48357 | $48.00 | MAN |
1/21/2016 | 50087 | $28.00 | MAN |
1/23/2016 | 50087 | $49.00 | MAN |
1/27/2016 | 50087 | $2.00 | RES |
1/27/2016 | 50087 | $9.00 | MAN |
1/26/2016 | 56163 | $43.00 | MAN |
1/22/2016 | 57622 | $6.00 | MAN |
1/25/2016 | 62544 | $17.00 | MAN |
<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>