Since the discovery of superconductivity, the realization of room-temperature superconductivity has been the long dream of mankind. Recently, it has been reported that nitrogen-doped lutetium hydride has room-temperature superconductivity at near-ambient conditions. However, there is no solid evidence of such tantalizing superconductivity in nitrogen-doped lutetium hydride synthesized by follow-up experiments. The compositions and crystal structures of the nitrogen-doped lutetium hydride are still unclear. Therefore, we here systematically study the structural stability and electronic properties of and N-doped , such as 1, 2, 3, 4, and 8% N, by first-principles calculations. Our further electronic properties calculations show that all the simulated Lu-N-H ternary compounds are metallic, except for a semiconducting phase of . Remarkably, the contribution of the H atoms to the electronic density of states at the Fermi level could be tuned by the increasing N concentration. Electron-phonon coupling calculations also show that both and are superconducting with critical temperature 's of 23 and 32 K at 24 and 60 GPa, respectively. Our current results suggest that and N-doped could be potential superconductors only at high pressure, while the estimated values are much lower than room temperature.