How can I format the last row of a table?

Hello @mgholam,

Unfortunately, I don’t seem to have found a programatic way to shade the last row of your table. You should be able to using a variable, and changing n-rows appropriately for each table.

#let n-rows = 3
#set table(
	inset: (x:0.5em,y:.4em),
	stroke:_gridlines,
	fill: (x, y) => if y==0 or y == n-rows { rgb(_shadecolor) },
)

don’t hesitate to provide a full minimal example the next time you ask a question, as stated in How to post in the Questions category.