+ Reply to Thread
Results 1 to 5 of 5

% of vacant units using 2 pivot tables - Dynamic

  1. #1
    Forum Contributor
    Join Date
    09-08-2016
    Location
    Canada
    MS-Off Ver
    MS365 Version 2401
    Posts
    127

    % of vacant units using 2 pivot tables - Dynamic

    Hi All,

    I have two pivot tables with data. I need a formula to calculate the % of vacant units (right pivot) vs. total units (left pivot).

    I need the formula to be dynamic as I change the top line filter to ensure it's pulling the correct comparison for the ID's.

    I am attaching the pivot tables with the relevant data. Please let me know if there is anything else you require.

    Thanks in advance for your help!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,035

    Re: % of vacant units using 2 pivot tables - Dynamic

    Administrative Note:

    Is your forum profile showing the Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    09-08-2016
    Location
    Canada
    MS-Off Ver
    MS365 Version 2401
    Posts
    127

    Re: % of vacant units using 2 pivot tables - Dynamic

    Thanks for the recommendation AliGW.

    I am currently using MS365 version 2401. Hope this helps and I will update my profile to reflect this.

  4. #4
    Forum Contributor
    Join Date
    09-08-2016
    Location
    Canada
    MS-Off Ver
    MS365 Version 2401
    Posts
    127

    Re: % of vacant units using 2 pivot tables - Dynamic

    Hi, can someone assist me with the formula for this please?

    Thanks. Much appreciated.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,578

    Re: % of vacant units using 2 pivot tables - Dynamic

    This might be easier to accomplish using Power Query.
    1. Convert the RawData range into an Excel table
    2. Add the table to the Data Model
    3. Add the following measures to the Data Model
    Count of Unit sub t:=COUNTA(Table1[Unit sub t])
    Count of Vacant:=CALCULATE(COUNTA(Table1[Unit sub t]),Table1[Vacant]="x")
    % Vacant:=[Count of Vacant]/[Count of Unit sub t]
    4. Produce a pivot table from the data model using the same fields in the Row, Column and Filter as in the other pivot tables and using the % Vacant measure in the Values area
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dynamic Pivot tables from two Sheets
    By sid86 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-04-2017, 12:08 AM
  2. Dynamic Filter between two pivot tables
    By HYChau in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 02-03-2017, 10:27 AM
  3. Can Pivot Tables be Dynamic?
    By jtilleyx in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-27-2016, 07:11 AM
  4. Counting Number of Vacant Units
    By NoLeafClover in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-14-2015, 08:36 PM
  5. Replies: 6
    Last Post: 12-23-2013, 09:23 AM
  6. Dynamic Pivot Tables
    By calli in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 05-07-2007, 04:00 PM
  7. [SOLVED] Dynamic Pivot tables
    By Phil in forum Excel General
    Replies: 3
    Last Post: 01-31-2005, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1