Using range variable in legend

Currently if I use $__range variable in Legend it doesn’t work:

But if I use $__interval it works ok.

Is this a bug? Or is it not supposed to work?

Grafana: v7.3.3
Datasource: prometheus