Run following query to verify custom property is set up properly:
SELECT i.interfaceId,i.caption,optim.InterfaceID Optimized_Id, optim.caption Optimized_Caption FROM Interfaces i JOIN Interfaces optim ON (i.OptimizedInterfaceID=optim.interfaceId) WHERE i.OptimizedInterfaceID IS NOT NULL
Run following query. Are there some zeros in columns PreTotalBytes or PreTotalPackets?
select t.InterfaceID PreInterfaceId, dbo.DateOnly(DateTime) PreDate, Sum(In_TotalBytes) PreTotalBytes, Sum(In_TotalPkts) PreTotalPackets
from InterfaceTraffic t
inner join Interfaces i on i.InterfaceID = t.InterfaceID
where DateTime > DateAdd(day, -7, GetDate()) and DateTime <= GetDate()
and OptimizedInterfaceID is not null
group by t.InterfaceID, dbo.DateOnly(DateTime)