3 Replies Latest reply on Oct 10, 2018 12:33 PM by ShivaRam Chennapragada

    Unable to subtract two measures

    Andy Hulsey

      I have a requirement to identify an amount associated with the most recent date and then subtract the amount from the day previous to that and display the difference.

       

      In the attached workbook, I have mocked up my approach so far:

       

      • I used LOD {FIXED : MAX([Date])} to find the latest date
      • Created a calculated field where if Date = the date above, return the measure
      • Created another calculated field where if Date = the date above - 1, return the measure

       

      So far, so good, the calculated fields are returning the correct values. However when I try to subtract one day from the other, I get null every time.

       

      Can someone help me understand where I'm going wrong?

       

      Thanks,

       

      Andy