The command used in this video:For calculating 2D Length: $lengthFor calculating 3D Length:sqrt($length ^ 2 + (z_max($geometry) z_min($geometry)) ^ 2)