2 Replies Latest reply on Apr 14, 2017 8:44 AM by Alex Marlow

    Values Swap

    Alex Marlow

      Hi Everyone, I have been working on a project for Independent Expenditures visualizations. I almost have this completed, but need to switch the opposition values through what I think will be a calculated field. I've been working on a calculation that fixes on the State, District, and First place winner to take the opposition value. However, it does not quite work correctly.

       

      Here is what my visual looks like, I am needing the values in Red to be switched with the other candidate that is in the same district. Show below that is 02 so first place should show $1,518,489 and second place should show $1,411,244.

       

      Screen Shot 2017-04-14 at 10.17.58 AM.png

       

      Please let me know if you have any ideas on how to perform this as it is a fairly complex problem.

       

      Thank you!

        • 1. Re: Values Swap
          Matthew Risley

          Alex,

           

          I would like to help you! However, I'm a little fuzzy on what you are looking to do. Could you post a sample of your data/workbook so we could play with the data.

           

          I also don't know what your desired outcome is? You mentioned switching the red with the other candidate in the same district. Are you asking to sort from highest to lowest within each district?

          • 2. Re: Values Swap
            Alex Marlow

            Hi Matt, my apologizes. I forgot to include my link to the data that is posted on Tableau public.

             

            Here is the link: Tableau Public

             

            So, what we're seeing in the data in this visual is the opposition amount that was spent against that candidate. My goal is to not have that assigned to the candidate, but the person that spent it against them. So basically I need to swap the values that are show for each candidate within each district.

             

            Please let me know if you have any further questions.

             

            Thanks!