KPI view for down nodes per group or custom property

Hi All,

 

I need some help with creating KPI view in modern dashboard showing the down nodes for each group or custom property.

 

I’m using the  following query for all nodes but I need it to  be filtered on groups and custom property.

SELECT COUNT(1) AS KPI_Numbe from Orion.Nodes WHERE Status=2

 

I would appreciate if someone can help