With working from home being the new normal here's a way to see how many users are remote vs still working onsite.

Requirements:
- Horizon View Servers
- Horizon View Template downloaded from Thwack
- F5 Connectivity (It's what this widget relies on but feel free to adapt to your needs)
Horizon View while being a phenomenal tool isn't capable of knowing who is a local user and who is remote so to workaround it we target the SSL connections on the F5 in the View pool (Pcoip or Blast, either works).
First the Swql query:
select result as connections, status from (Select (sum(pm.Connections)) as result, 'remote' as status from Orion.F5.LTM.PoolMember as pm, Orion.F5.LTM.pool as p where p.PoolID = pm.PoolIndex and pm.Port = 1776 and pm.Connections != 0 union all ( select sum(result) as connections, 'onsite' as status from -- v-- negative number (select (0 - sum(pm.Connections)) as result, 'total' as status from Orion.F5.LTM.PoolMember as pm, Orion.F5.LTM.pool as p where p.PoolID = pm.PoolIndex and pm.Port = 1776 and pm.Connections != 0 union all ( -- v-- positive number select sum(csd.ComponentStatisticData) as result, 'total' as status from Orion.APM.CurrentStatistics as csd where csd.ComponentID = 1776))))
(In honor of the 4th of July I used 1776 as the ID for all of the required component and port IDs. Replace those with the correct numbers for your environment).
Now open up your dashboard and select a pie chart widget (I like Donut Charts for this data) with the settings as below and you're done!
