List construction

Hi,

How do I construct a list of f[x,y] where x runs from 1 to T, y<=x but y<=K? Right now I’m using

Table[f[x,y],{x,1,T},{y,1,x}]

and then using Cases to pick the elements I want.
But this is inefficient because Table outputs more elements than necessary (i.e. those for which y>K).

Nevermind, just realized Mathematica can handle

Table[f[x,y],{x,1,T},{y,1,Min[x,K]}]