+ Reply to Thread
Results 1 to 16 of 16

How to summarise dependent totals on a single data set.

  1. #1
    Registered User
    Join Date
    06-23-2016
    Location
    London, England
    MS-Off Ver
    2016 (Win10)
    Posts
    17

    How to summarise dependent totals on a single data set.

    This is probably an FAQ so apologies.
    I can do all the below in PowerShell by using Group object, sort object, select object and the pipeline, but excel is a program I don't know well so I am struggling to nest output arrays together as I would in PowerShell [probably this completely the wrong way to conceptualise the solution in excel].

    This is the overview of what I am after.

    I have a set of data (a MS active directory export) and I am looking to summarise aspects of that data set in adjacent columns on a separate tab in excel.
    Something like a total count of a given AD container and then in the next column 23 of that total are blue and of those 23 blue 4 are straight and of those 4 straight 2 are glued and the other 2 are rough. if I can describe that in excel formulas, I can solve all my display requirements.
    The point is that some columns depend on referencing the members of the previous columns output and then re-querying the original dataset to evaluate other columns of that data and totalling it. I realise that the grouping from a previous column will be lost inside the formula since I only want to display the total in each case.

    In more specific detail:

    I need to summarise different elements of all the users in each OU in scope, there are about 90 OU's with 35000 users.
    1. Initially I want a column (sorted descending) with the count of users in each OU - some have 25 and others 10000 or so.
    2. Then I want a adjacent column with the number of users in each of those OU's which have a password older than three years - (which is less than for excel since it will be a smaller integer between that date and 01/01/1900 or whenever excel starts from.)
    - So this is a dynamic array selection on the main data set passed to a "countif date is less than" in my head - but I can't get that to work. . . so.
    3. I need to also display in the next column how many of the accounts in this OU meet another criteria.
    - So this needs to reference the cells returned in #2 and then query another column for text "TRUE" or "FALSE" or other conditions.

    I think those cover off the three types of things I need to do.

    To recap all queries against the 35000 rows of the original data need to be constrained by the Organisational Unit [Ad container]. Some future queries depend on (reference) a collection [dynamic range] from a previous query and interrogate other columns using that [dynamic] range as the row references.

    Is this simply too complex for excel or if not is it better done with a pivot table or a bunch of specific queries and helper tabs / cells if needed?

    I have attached a sample 10 rows of data [obviously not real data] to demonstrate how it is organised.

    Thanks in advance.
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: How to summarise dependent totals on a single data set.

    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 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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: How to summarise dependent totals on a single data set.

    OK - no reply yet regarding your version, so I'll assume that you've upgraded to 365 like most people.

    I have PTs - I'll always try to find a way round them. Here's a way of generating what you want with new 365 functions:

    =LET(u,UNIQUE(Sheet1!C2:C10),pgt,BYROW(u,LAMBDA(r,SUMPRODUCT(((TODAY()-Sheet1!AS2:AS10)>10)*(Sheet1!C2:C10=r)))),pne,COUNTIFS(Sheet1!Z2:Z10,FALSE,Sheet1!C2:C10,u),HSTACK(u,pgt,pne))
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-23-2016
    Location
    London, England
    MS-Off Ver
    2016 (Win10)
    Posts
    17

    Re: How to summarise dependent totals on a single data set.

    Sorry the version is listed against my name and in my profile ? It is licenced as 2016, but I think it is actually 365 as it updates regularly. Is there somewhere else this information needs to be placed other than in my BIO at top left ?

  5. #5
    Registered User
    Join Date
    06-23-2016
    Location
    London, England
    MS-Off Ver
    2016 (Win10)
    Posts
    17

    Re: How to summarise dependent totals on a single data set.

    Many thanks Ali, let me try to digest that !

  6. #6
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: How to summarise dependent totals on a single data set.

    If you have 365, please update your forum profile without delay.

    Ask if you need this explaining.

    It is licenced as 2016, but I think it is actually 365 as it updates regularly.
    Read my first post to find out how to check and how to update your profile.

  7. #7
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: How to summarise dependent totals on a single data set.

    And see below:
    Attached Images Attached Images

  8. #8
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: How to summarise dependent totals on a single data set.

    This is NOT Excel 2016:

    MSO (Version 2403 Build 16.0.17425.20176) 32-bit
    It is 365 - please change 2016 in your profile to 365.

  9. #9
    Registered User
    Join Date
    06-23-2016
    Location
    London, England
    MS-Off Ver
    2016 (Win10)
    Posts
    17

    Re: How to summarise dependent totals on a single data set.

    I am finding that once I "allow editing" on the example workbook attached to the thread - all the values change to #NAME? - they preview fine though.

    Attachment 867450
    Attachment 867451

    Also when I type "=Let(" no function is found and applied. So perhaps the functionality of my version of excel is limited to 2016 even though its 2403 ?

  10. #10
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: How to summarise dependent totals on a single data set.

    In that case, you don't have 365 after all, but 2016 won't be getting any updates now.

    Please check in Excel under File > Account - what does it say? Does it look anything like this?
    Attached Images Attached Images

  11. #11
    Registered User
    Join Date
    06-23-2016
    Location
    London, England
    MS-Off Ver
    2016 (Win10)
    Posts
    17

    Re: How to summarise dependent totals on a single data set.

    I get this (Its for outlook but the version and logo are the same.

    13.jpg

  12. #12
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,444

    Re: How to summarise dependent totals on a single data set.

    Well, I''ve never seen that before!

    Do you have two versions of Office installed? If so, what happens when you click on the Excel icon to launch a blank workbook in Excel? Do you get a different version? If so, then maybe your file associations need updating.

  13. #13
    Registered User
    Join Date
    06-23-2016
    Location
    London, England
    MS-Off Ver
    2016 (Win10)
    Posts
    17

    Re: How to summarise dependent totals on a single data set.

    No - it's all Office 2016 Click to Run - what's going on is the functionality of the licence I have (2016) is being imposed onto the M365 build I am running - that's how they do it. So unless I start subscribing I will not unleash the extra functionality that lies within the 2043 binaries on my disk.


    C:\Program Files (x86)\Microsoft Office\Office16>cscript ospp.vbs /dstatus
    Microsoft (R) Windows Script Host Version 5.812
    Copyright (C) Microsoft Corporation. All rights reserved.

    ---Processing--------------------------
    ---------------------------------------
    PRODUCT ID: 00338-95670-06701-AA296
    SKU ID: de52bd50-9564-4adc-8fcb-a345c17f84f9
    LICENSE NAME: Office 16, Office16ProPlusR_Retail edition
    LICENSE DESCRIPTION: Office 16, RETAIL channel
    LICENSE STATUS: ---LICENSED---
    Last 5 characters of installed product key: xxxx
    ---------------------------------------
    ---------------------------------------
    ---Exiting-----------------------------

    Build data as per the bitmap previously.

    Did your other post mean to say you no not like pivot tables ?

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

    Re: How to summarise dependent totals on a single data set.

    My suggestion is to add two columns to the source data.
    For passwords more than 10 days old: =(TODAY()-AK2>10)+0
    For passwords that don't expire: =(Z2=TRUE)+0
    Change the source of the pivot table to include the two new columns.
    Pull the two new fields into the Values area of the pivot table field list.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  15. #15
    Registered User
    Join Date
    06-23-2016
    Location
    London, England
    MS-Off Ver
    2016 (Win10)
    Posts
    17

    Re: How to summarise dependent totals on a single data set.

    Other matters have been consuming my time - thank you for the help and the suggestion. I think that might be simpler to implement as I can constrain it to a dynamic range on the OU.

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

    Re: How to summarise dependent totals on a single data set.

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. [SOLVED] Summarise data from multiple task types to single task types
    By Rabbitoh in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-26-2023, 12:19 PM
  2. [SOLVED] Create 7 dependent dropdown using data validation based on multiple dependent columns
    By b_raj_kumar in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 11-07-2021, 05:20 PM
  3. Correct combination of SUMIF/INDEX/MATCH to summarise monthly totals
    By QuantumP in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2017, 07:10 AM
  4. Summarise data
    By harignz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-05-2014, 03:35 AM
  5. Dependent Validation List (Single)
    By jj102294 in forum Excel General
    Replies: 10
    Last Post: 01-05-2013, 12:26 AM
  6. Summarise data
    By NWSIT in forum Excel General
    Replies: 2
    Last Post: 11-30-2010, 02:42 PM
  7. summarise totals from many worksheets into one final worksheet
    By NAAPS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-22-2006, 10:45 AM

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