How to filter rоws in date table ......?

d / r a acting like local variables referencing the looped row