+ Reply to Thread
Results 1 to 5 of 5

Pivot data with multiple conditions

  1. #1
    Registered User
    Join Date
    08-24-2016
    Location
    USA
    MS-Off Ver
    2016
    Posts
    12

    Pivot data with multiple conditions

    Dear All,

    I'm trying to pivot data or utilize formulas or VBA. The file is attached. The data is coming from the Data Base tab to Output tab, which at this point has the data manually altered/input. Eventually, I'd love this to be done without my involvement. I'm trying to pivot data in a way that if the document Name (column C) breaks down data per countries (regardless of the number of TYPES), the pivot should sum up the Net USD (col H), % (col G) and TOTAL (col J) per countries. If the document NAME (column C) breaks down the data for only one COUNTRY (col E) but multiple TYPES (col K), then the pivot/formula should sum up NET USD (col H), % (col G) and TOTAL (col J) per TYPE (col K). All of the above should only take the largest REV # (col L) regardless of the STATUS (col M).


    Any help would be much appreciated
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot data with multiple conditions

    with a pivot table.

    see the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    08-24-2016
    Location
    USA
    MS-Off Ver
    2016
    Posts
    12

    Re: Pivot data with multiple conditions

    Oldere,

    Thank you for your response. Unfortunately, this is not quite what I'm trying to achieve, multiple reasons:
    1. Data source LKB-4334 should only displays REv#11, rather than both 10 and 11
    2. Data Source LKB-4333 should reflect type SRCH rather than county US

    I've updated your attached file, which reattached here also I've put formula descriptions below:
    added cells M1:I7 on Output tab.

    Column Unique RA code (cell M2:M7) ==> this column shows only uniqe AR codes
    Please Login or Register  to view this content.
    Largest/latest Rev# (Cell N2:N7) ==> the final date should be filtered for the largest Rev#
    Please Login or Register  to view this content.
    Number of Countries per AR code (cells O2:O7) ==> this column calculates unique values in the country column on ht edata base tab. So, if this column shows 1, which would mean that Data base tab breaks down the data per one country and multiple types. so, the final output should break down the values per type, rather than the country. the opposite with, if this column shows number above 1.
    Please Login or Register  to view this content.
    This is where I'm, hopefully someone will be able to help out to use these formulas. maybe as a helper column or a formula for the calcualted field in the final pivot.

    But thank you for your effort Oldere. I feel that we are on a right track.
    Last edited by lukihnio; 09-01-2016 at 12:09 PM. Reason: Figured how to upload the file

  4. #4
    Registered User
    Join Date
    08-24-2016
    Location
    USA
    MS-Off Ver
    2016
    Posts
    12

    Re: Pivot data with multiple conditions

    Oldere,

    I figured how to upload the file. Please see attached.

  5. #5
    Registered User
    Join Date
    08-24-2016
    Location
    USA
    MS-Off Ver
    2016
    Posts
    12

    Re: Pivot data with multiple conditions

    Hi figured it out. The helper columns on the main data table have to be created.
    1. First helper column determines the number of the version
    2. second determines the latest version or the largest per document name
    3. Displays latest vs previous, to the largest and all other ones, respectively
    4. this column should display number of unique items in countries column per document name
    5. If the number in 4th helper column will be above one, it will display country, otherwise type
    finally, pivot table, with filter for the latest and one of the row 5th column data

+ 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. Replies: 2
    Last Post: 01-14-2016, 03:53 PM
  2. [SOLVED] Macro for data present in multiple rows and columns following multiple conditions
    By macrolearnerkk in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-07-2015, 11:20 AM
  3. Displaying Top Items in a Pivot by Multiple Conditions
    By 5150 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-26-2014, 02:51 PM
  4. Sum data with multiple conditions
    By mm671750 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-02-2013, 01:10 PM
  5. Power Pivot with multiple pivot charts using different pivot data
    By Paul-NYS in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-10-2013, 10:18 AM
  6. Multiple conditions to get data
    By mrd4u in forum Excel General
    Replies: 3
    Last Post: 11-29-2011, 12:21 PM
  7. How can I remove multiple data by multiple conditions?
    By FlorinS in forum Excel General
    Replies: 4
    Last Post: 08-23-2009, 02:01 PM

Tags for this Thread

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