+ Reply to Thread
Results 1 to 3 of 3

Second max date within category

  1. #1
    Registered User
    Join Date
    12-08-2014
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    87

    Second max date within category

    Hi,

    I created a measure in Power Pivot model to calculate max date within category
    Please Login or Register  to view this content.
    . How can I calculate second max date for category?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Second max date within category

    Not too familiar with PP, but take a look and see if LARGE() will do what you want?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Second max date within category

    Hi,

    PHP Code: 
    SecondLargest :=
    CALCULATE (
        
    MAX 'Invoices'[Date] ),
        
    FILTER (
            
    ALLEXCEPT 'Invoices''Invoices'[Category] ),
            
    Invoices[Date] <> [FirstLargest]
        )

    Replace FirstLargest with the name of your measure for calculating the max.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

+ 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] Macro to filter data by category and delete rows where category sums up to zero
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2021, 12:57 PM
  2. Replies: 1
    Last Post: 11-24-2020, 10:44 AM
  3. Replies: 0
    Last Post: 04-09-2014, 04:21 PM
  4. Replies: 2
    Last Post: 09-14-2012, 04:31 AM
  5. [SOLVED] Productsum: Highest Frequency Category, Specific Main Category, Frequency of Category
    By T86157 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-24-2012, 12:43 PM
  6. Help SUM by date and category
    By johnrriggs22 in forum Excel General
    Replies: 2
    Last Post: 12-13-2010, 02:15 PM
  7. Single field fits fault category, event category determined by group of faults
    By SchoobsVT in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2010, 08:51 AM

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