1 Reply Latest reply on Feb 23, 2016 5:31 AM by Egor Larin

    Sorting + top-n after blending data

    Egor Larin

      Hi there,

       

      This is my situation:

      I've got a table with page visits for each page (page_id, visits)

      I've got a table where i calculated source-target relation of user's visit (source_page_id, target_page_id)

      I've blended it in Tableau by fields (page_id - target_page_id)

       

      On my final dashboard i use top-20 pages by visits to filter source-target table. This allow me know which page user visited after page from top. I'm using a special filter action on dashboard to filtering source_page.

       

      I need to see only top-20 target pages from source-target table by visits from first table.

       

      How can i sort and create top-n calculation on the second table? Also i need to sort my target pages by visits

       

      There is my example.

       

      Thnx for any help

        • 1. Re: Sorting + top-n after blending data
          Egor Larin

          Ok, self-served solution

           

          1. Blend data by Page ID (copy)-Source id to count how many Targets pages I have (count(Target ID)). Why copy - because we can't use the same filed twice in Data Relationships (Main Pages view)
          2. In another data source create a Visits measure which comes from blended data source with visits. For that I need to blend by Target ID to Page ID
          3. Create a Rank Table Calculation for Visits. Use it like Dimension and put it between Source and Target dimensions
          4. Filter by this Rank calc with Custom value list - put here numbers from 1...20 (in my case I changed it to 1-5, because I don't even have more records) Also that will exclude target pages with null visits and sort my data properly
          5. Add a Filter Action to Dashboard - Source view - Main Pages- page ID, Target view Source-Target table - source id

           

          I hope that will help somebody

           

          Egor

          1 of 1 people found this helpful