2 Replies Latest reply on Oct 31, 2018 11:58 PM by Ankit Bansal

    Creating calculated field using the LOD Expression to derive groups

    Faizi Matin

      I have created a LOD expression for calculating the latest data from the data set shown below:


      Screen Shot 2018-10-25 at 6.51.27 PM.png


      Latest Device Count:

      if ({ INCLUDE [Device Name],[Store Id] : MAX([date])} = { INCLUDE [Device Name],[Store Id],[date]:MAX([date])}) THEN

      [Devices Count] ELSE

      0 END


      The outcome I am achieving is shown below:

      Screen Shot 2018-10-25 at 6.51.43 PM.png



      So from using the above calculation, I have to create a category Group of Device Count.

      Like Device Count Category should have values like:

      Screen Shot 2018-10-25 at 6.51.48 PM.png


      Desired Result:

      So I want to calculate no. of stores as per the device count category:

      Screen Shot 2018-10-25 at 6.51.52 PM.png


      Please help me with above queries.

      Jonathan Drummey

      Mahfooj Khan


      Thanks in advance.