6 Replies Latest reply on Oct 15, 2018 4:26 PM by Yuriy Fal

    Weighted Averages using LODs

    Borja Leiva

      Hi all,


      I am having some issues calculating the weighted averages using LODs for a visualization I'm working on at the moment.


      Basically I have a list of Countries that belong to Sub Regions which in time belong to Regions.


      I need to represent in a bar chart the average scores  at the different levels of granularity (Avg for All Countries, Avg for Region, Avg for Sub Region, Avg for Country). See image below.

      Wieghted Average bar chart.PNG


      What I also need is for each level to retain their value as the user filters the view at Region, Sub Region and Country level. That is if the filters are all showing 'All' , all the bars should have the same value, if I slect AMR as a Region, the bar for All firms should retain its original value and the other bars change to show value for AMR. If then I select South Am as a sub region the bar for Region should remain the same but the bars for Subregion and Country should change to adapt to the new selection.


      I have tried this using LODs but I cannot get the bars to retain their true value once I start filtering.


      Any ideas?


      Please find attached a file with mock up data that replicated the data I use for this.