9 Replies Latest reply on Sep 11, 2018 2:12 PM by Shinichiro Murakami

    Help with Max and Min

    Michael Begg

      Hi,

       

      I have daily transaction-level data

       

      In the below screenshot, I have calculated "MTD Daily Average" by Month and Trading Day using the below code:

       

      {FIXED [Year],[Month],[MTD trading days],[Account Group],[Account name 2],[Account name 1]: SUM([Amount MTD])/AVG([MTD trading days])/COUNT([perd_post])}

       

      I have then tried to calculate "Max MTD daily average" across all months using:

       

      {FIXED [Year],[MTD trading days],[Account Group],[Account name 2],[Account name 1]: MAX([MTD daily average])}

       

      However, the result is not what I want...ie for Trading Day 2, the Max daily average was 26,493 in September while the calculated field gives 20,497.

      Tableau_Max.JPG