Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
afbicbill
Engaged Sweeper II

I have a working report that works great that shows our USB-C Docks, however I'd like to change this to be a Chart report so that I can create a dashboard widget for the data.   The SQL query I have working for the report is below.  How do I change this so that it becomes compatible for use as a Chart report? 

 

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblUSBDevices.Name As [USB Device],
tblUSBDevices.Manufacturer As [USB Device Manufacturer]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblUSBDevices On tblAssets.AssetID = tblUSBDevices.AssetID
Where tblUSBDevices.Name Like '%usb-c%' And tblUSBDevices.Name Not Like '%Head%'
And tblAssetCustom.State = 1
Order By [USB Device]

3 REPLIES 3
afbicbill
Engaged Sweeper II

So, I'm a complete noob with Lansweeper and not great at SQL...but I am at least trying!   I am getting closer to what I'm after, but the graph wont display and there's an error in computing the percentages.  Any help steering me in the right direction would be greatly appreciated.

My Updated Chart Code:

Select Top 1000000 Count(tblAssets.AssetID) As Total,
tblUSBDevices.Name
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblUSBDevices On tblAssets.AssetID = tblUSBDevices.AssetID
Where tblUSBDevices.Name Like '%usb-c%' And tblUSBDevices.Name Not Like '%Head%'
And tblAssetCustom.State = 1
Group By tblUSBDevices.Name
Order By Total Desc

 

USB-C Chart.png

Mister_Nobody
Honored Sweeper III

Please draw what you want to see on the chart!

May be devices and their counts?

Just a simple pie chart that shows each type of USB-C dock we have and the quantity of each.  If each item in the legend were clickable to load the filtered summary of each dock, that would be great.LS Chart Example.png

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now