I am trying to get a count of our assets by department. I have created this report, but it only counts up to 554. When I look at our configuration/License page, it says we have 1779 licensed assets. I am not sure what is wrong with the report. The other weird thing I am seeing is two blank lines where the department is blank. One line shows a count of 0, the other a count of 10.
Select Top 1000000 tblAssetCustom.Department As [Business Unit],
Count(tblAssetCustom.Department) As [Asset Count]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join lansweeperdb.dbo.tblState On tblState.State = tblAssetCustom.State
Where tblState.Statename = 'Active'
Group By tblAssetCustom.Department,
tblState.Statename
Order By [Business Unit]