5 Replies Latest reply on Nov 1, 2016 3:54 AM by Norbert Maijoor

# Sum of 'active' records using LOD

I have data with records of individual devices where there are dates of device first time getting online and last time it was online.

I need to show the total number of 'active' devices that are online within say the past 7 days (based on the viz).

Wonder if any way i can use LOD to achieve the visualization.

• ###### 1. Re: Sum of 'active' records using LOD

Hi Hai

Find my approach as reference below and stored in attached workbook version 9.3

LOD expression: {fixed [Device]: min ([online])}

online last 7 days: if [LOD expression]>=(TODAY()-7) then "online within last 7 days"

else "Not online last 7 days" END

Counter:  if [LOD expression]>=(TODAY()-7) then 1

else 0 END

• ###### 2. Re: Sum of 'active' records using LOD

Hi,

Thanks for the prompt response.

Anyway to have a dynamic date, something that is not dependent on TODAY() as an anchor, but rather calculated based on the visualization.

E.g. if I put [First Online] in the column field that can be changed to days or weeks or months view, while I calculate the running total of 'active' devices based on [Last Online] parameter.

• ###### 3. Re: Sum of 'active' records using LOD

Hi Hai,

Something like,

if [LOD expression]>=[parameter.First Online] and [LOD expression]>=[parameter.Last Online] then "online within selected period"

else "Not online within selected period" END

• ###### 4. Re: Sum of 'active' records using LOD

Tried the following, but gotten null records.

IF {FIXED [Serial Number]:MIN([First Contact Date])}

>= [First Contact Date]

AND {FIXED [Serial Number]:MAX([Last Contact Date])}

THEN 1 ELSE 0 END

Attached image is the sample data I'm working on and the cumulative chart i'm trying to get (except this is a simple running total, rather than cumulative 'active' base where inactive devices are not summed in).

• ###### 5. Re: Sum of 'active' records using LOD

Hi Hai,

Find my approach as reference below and stored in attached workbook versio 9.3