Forum Discussion

Tomburton2023's avatar
Tomburton2023
Frequent Visitor
2 years ago
Solved

Adding a 'Total' row based on the currently displayed (filtered) data in a table

 Hi I am trying to work out how to do the above and struggling - it feels like I'm missing something obvious! Any help or advice would be appreciated. I have a report which pulls data from two Shar...
  • Dezmond95's avatar
    2 years ago

    So i'm guessing your table is built a little bit like this one where most the values are coming from the Matters table but you also have the month and year from the month value table?

    My understanding is that when you attempt to select a month in the slicer, it will change the table visual and appear to work by basically only displaying the selected month rows. However, because the month filter cannot go against the relationship direction, your matters table will still be a complete unfiltered table in the background. Since your values for Total Billed WIP etc are held there, when it goes to compute the total, the entire table is being summed as the table hasnt been able to be filtered to just the selected month.

     

    The below table shows what I think is happening in your case where it is only showing the matching months. For the red columns, these are more like the visible rows rather than filtered rows. The table is still complete but your only being shown these ones. The total is still summing the non visible rows as they are still there.

    For the solution I hope. There is a function called Related. It allows you to pull the related value from the ONE side of the relationship into a column in the many side by specifying the column you want to pull the value of . The table below is the month values table, I created new columns and added in Fee Earners, I repeated the same process for Person in Charge, and Total Billed WIP.

     

    After this I recreated the table now that I can use columns from just my Month Values Table. I updated the slicers to use the new columns in the Month Values table.

     This is using the Person in Charge (From the related function) as a slicer, the total is appearing correctly.

     i tested it with a combination of the slicer options you wanted.

    It all appeared to work. 

    Hopefully this solution works for you.

    It's likely not the best performance wise but it should hopefully allow you to function as you want it too.

    Let me know if you need more advice.

    P.S. I would recommend blanking out any personal names or details in your pictures when posting.