1 Reply Latest reply on Apr 1, 2016 12:58 PM by Dan Sanchez

    Differences in Name Value Pair

    Yan Wu



      I have data in name value pair.  The data structure is day, field, value.   I would like, for any day, to compare, the difference of A - B.


      Any ideas would be super helpful!


      I got myself into a tangle of lookups and functions and it hurt my brain.

        • 1. Re: Differences in Name Value Pair
          Dan Sanchez

          Hello Yan!


          If we set up a Difference table calculation like this:


          ZN(SUM([Value])) - LOOKUP(ZN(SUM([Value])), -1)


          Then all we need to do is place the Date field on Columns, our calc on Rows, and the Field dimension on detail.  The next step is that we need to configure the advanced Compute Using so it matches the screenshot (accessed by right-clicking the Value Difference calc on Rows and selecting Edit Table Calculation)



          Hope this helps, thanks!