8 Replies Latest reply on Aug 14, 2019 3:35 PM by John Sarantos

    what's the difference of max[date] and datediff('day',[date],{max[date])}=0

    jingchun liu

      I am a beginner. Please help me.

       

      I create calculated field "max date" using code: max[date].

      I create calculated field "last day" using code: datediff('day',[date], [max date])=0

       

      I try to use sum(IIF([last day], [volume],null) or sum(IIF([max date], [volume], null) to calculate last day volume.

      I don't know why the second doesn't work. (volume is one of the measures.)

       

      I try to calculate the last week using code: datediff('day',[date],[max date])<=6; here, I can't use [last day].

       

      For me, the [max date] is the same to [last day]. Is there difference between max[date] and {max[date]}? I couldn't really understand the differences. I googled and it says the former is aggerated and the latter is not.

       

      They are very confusing.

       

      Thanks,