3 Replies Latest reply on Dec 2, 2016 2:46 AM by Luciano Vasconcelos

    Filtering top 10 per state using context

    Jaime Fernandez

      Hello community,

       

      I have a dashboard that shows total incurred costs by state on a map, then I have another view on it that is supposed to show the top 10 client's that incurred the most for that state. I have messed around with it for some time using context but can't get it to work correctly.

       

      My goal is to be able to click on a state from the map (using it as a filter) and have the bar chart underneath show what are the top 10 client's that incurred the most in that state. However it isn't showing top 10, only the ones that fall into the top 10 overall.

       

      I have tried using the client companies as a context filter, no luck. I have also tried using the states as a context filter, still no luck. Can anyone help me out? Thank you

        • 1. Re: Filtering top 10 per state using context
          Luciano Vasconcelos

          If i understood you well, you need to include the filter generated by map action on context.

          1 of 1 people found this helpful
          • 2. Re: Filtering top 10 per state using context
            Jaime Fernandez

            I found my mistake, I had a date filter on the view that wasn't included in the context, once I added the map action and the date filter to context, it seems to be working fine.

             

            To extend my knowledge this is what I believe was happening before I added the date filter to context:

             

            The data was being filtered by the state (the action) -> then it was filtering the top 10 by client company, giving me 10 clients -> then it was filtering by the date range ommiting the ones in the previous top 10 that didn't fall within the date range which lead to some being less than 10.

             

            once the filter was added I believe it worked like this:

            Filtered by the state (action/context) -> then filtered by the date (context) -> then took the top 10 clients of under both filters which left me with 10 clients.

             

            Please correct me if my flow is wrong. Thanks for the help!!

            • 3. Re: Filtering top 10 per state using context
              Luciano Vasconcelos

              I'll try to explain in a simpler way:

               

               

              You had conflicting filters executing at the same time. This made your ranked lines to be filtered and result in an undesirable exit.

              Since you put action filters on context, this filter was executed first and then ranking filter was executed.