Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Get value based on date range filters

$
0
0

Hello all - is this possible?

I have a table called T1 with 3 columns - Id, Date, Qty

Another table called T2 with 3  columns - Id, Date, Type

The two tables are joined on Id. For one Id in T1, there can be multiple Types in T2.

 

How can I add a calculated column in T1 to get Type from T2 such that the column only picks that latest Type based on the date Something like - TOP 1, T2[Type] WHERE T2[DATE] <= T1[DATE].

 

Thanks in advance!

 


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>