13 Replies Latest reply on May 17, 2016 11:37 PM by Nagarajan R

    SUM a set of MAX aggregations

    mark.welsh

      My main question is can I roll up MAX calculations to a SUM if I'm going from Sub-Category to Category where all sub cats are contained within only one cat? 

       

      The reason I'm even asking this question has to do with my row level data aggregation, and this is perplexing me even more.  I'm a data analyst (not a DBA), so I have SQL knowledge but I am no guru.  My data source is as follows:

       

      Table1 contains all of my lowest level detail data.  I would like to retain all of this detail for drill down purposes.  Table2 contains a summary of related data (shares 3 common fields with Table1), but it is summarized at a higher level.  So, when I left join T1 to T2 I get repetition of my summarized values from T2 which means in order to use T2 data I need to perform a MAX, so that I'm not duplicating the summary values.  Now that I have a MAX at Sub-Category level I need to be able to roll it up to Category level by summing each MAX(SubCat).  Is this possible?  In my Excel dashboard I just created separate links to my Access database, so T1 and T2 would be totally separate "data sources".  In Tableau, I'm trying my best to merge them into one data source, so that I can filter the data easily without workarounds.  I still don't know how to filter two data sources by a date field and have it formatted as a slider - currently using a date drop down which is undesirable. 

       

      Please if you have any suggestions on how to blend my data (I haven't tried this yet) let me know.  Essentially I just need to maintain low level detail from T1 and then also have T2 summary data. 

       

      It's probably hard to answer this without more details, so high level theorizing is welcome as well.  I've had Tableau for a few weeks now and have had zero training beyond online videos and google.  Using 9.3.