5 Replies Latest reply on Jan 2, 2019 4:16 AM by Björn Grahlher

    Aggregation type 'last value' / LOD question

    Björn Grahlher

      Dear all,

       

      I'm new to Tableau and struggling with implementing an aggregation of type last value. Sample data is

       

      Result rows should always show

      • the last value for each dimension A when aggregating along dimension B
      • the sum when aggregating along all other dimensions (A and date).

      For instance the initial table with all subtotals and column grand totals should look like this

      Another view could be the following

       

      I've read many discussions on LOD expressions, but the closest I got is

      using following calculated fields

      and

      Here, the results are fine but the second calculation is excluding the line items which are not the last value. I played with some nested LODs but without any success.

       

       

      Any hints or suggestions are highly appreciated, I attached my sample twbx (Tableau 2018.2).

      Thank you very much for your help!