Forum Discussion
jack555
Advocate III
2 years agoFind the maximum date before the selected period
I have tables as below Sales table with employe code, date, and sales amount Training table with employee code and training date. DateDim table - relationship with date in sales and training tabl...
ThxAlot
Super User
2 years agojack555
Advocate III
2 years agoThxAlot thank a lot 😀. This is closer to what I look for. However training dates are repeated in each row. I would like to see the training date against the period only and if any previous attendence then first row should show the previous date; remaining of the rows where no attendence should be blank.
Below is the expected outcome.
| mpCode | Month | Sales Amount | Training Label |
| 103 | Jan-23 | 6283 | Previous Attendence on 15/5/2022 |
| 103 | Feb-23 | 7475 | |
| 103 | Mar-23 | 7529 | |
| 103 | Apr-23 | 3057 | |
| 103 | May-23 | 6461 | |
| 103 | Jun-23 | 6770 | |
| 103 | Jul-23 | 8888 | |
| 103 | Aug-23 | 9262 | 15/08/2023 |
| 103 | Sep-23 | 2210 | |
| 103 | Oct-23 | 6280 | |
| 103 | Nov-23 | 4312 | |
| 103 | Dec-23 | 5590 |