+ Reply to Thread
Results 1 to 18 of 18

Dynamic filter function by month

  1. #1
    Forum Contributor
    Join Date
    04-18-2014
    Location
    Pune, India
    MS-Off Ver
    Excel 2021
    Posts
    121

    Dynamic filter function by month

    Good evening excel expert,

    what i'm trying to do is only to filter month wise when i select d3,h3 and l3 column, im using below formula but result not getting, request you to please help in this regard.Dashboard.xlsx enclosed the file for your reference.

    FILTER(CHOOSE({1},Data!C2:C393,Data!K2:K393),Data!K2:K393=Master!H3)

  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
    80,918

    Re: Dynamic filter function by month

    Is this what you want?

    =LET(f,FILTER(Data!A2:M393,(MONTH(Data!C2:C393)=MONTH(DATEVALUE(Master!Criteria&" 1")))),CHOOSE({1,2,3,4,5},INDEX(f,,3),"",INDEX(f,,2),"",INDEX(f,,12)))
    Attached Files Attached Files
    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 Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Dynamic filter function by month

    Is the year important... or will you only ever have one year of data in your sample?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Contributor
    Join Date
    04-18-2014
    Location
    Pune, India
    MS-Off Ver
    Excel 2021
    Posts
    121

    Re: Dynamic filter function by month

    Thank you for your quick reply, you've mistaken what i want to try is if i select from drop down d3 and L3 of h3 and b3 result should be only india mart of imple PO received

  5. #5
    Forum Contributor
    Join Date
    04-18-2014
    Location
    Pune, India
    MS-Off Ver
    Excel 2021
    Posts
    121

    Re: Dynamic filter function by month

    Quote Originally Posted by Glenn Kennedy View Post
    Is the year important... or will you only ever have one year of data in your sample?
    Its a helper column for countifs sir what i want is month wise to filter lets say if i select india mart, month may, customer impel, and PO received, result should be

    column1 column2 column3
    02-May-23 Sai Controls PO Received

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,918

    Re: Dynamic filter function by month

    That's not what your attempted formula was suggesting and you failed to mock up expected results!

    Try adding to the filter part:

    =LET(f,FILTER(Data!A2:L393,(MONTH(Data!C2:C393)=MONTH(DATEVALUE(Master!Criteria&" 1")))*(Data!L2:L393=Master!L3)*(Data!B2:B393=Master!B3)*(Data!K2:K393=Master!H3)),CHOOSE({1,2,3,4,5},INDEX(f,,3),"",INDEX(f,,11),"",INDEX(f,,12)))
    Attached Files Attached Files
    Last edited by AliGW; 05-29-2023 at 08:09 AM. Reason: Workbook added.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Dynamic filter function by month

    You did not answer my Q. In your real sheet can data from May 22 and May 23 BOTH be present? Do you also need to search for ther YEAR?

  8. #8
    Forum Contributor
    Join Date
    04-18-2014
    Location
    Pune, India
    MS-Off Ver
    Excel 2021
    Posts
    121

    Re: Dynamic filter function by month

    Quote Originally Posted by Glenn Kennedy View Post
    You did not answer my Q. In your real sheet can data from May 22 and May 23 BOTH be present? Do you also need to search for ther YEAR?
    Sorry for replying you late as I was on the way yes sir both

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Dynamic filter function by month

    I have added in a cell to select the year (you can turn it into a dropdown yourself).

    This formula incorporates the year:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,918

    Re: Dynamic filter function by month

    Is HSTACK available in Excel 2021, Glenn? I avoided it because I think it's only in 365.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Dynamic filter function by month

    Oh POOH! You're right, Ali.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Dynamic filter function by month

    So...

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    04-18-2014
    Location
    Pune, India
    MS-Off Ver
    Excel 2021
    Posts
    121

    Re: Dynamic filter function by month

    Quote Originally Posted by AliGW View Post
    That's not what your attempted formula was suggesting and you failed to mock up expected results!

    Try adding to the filter part:

    =LET(f,FILTER(Data!A2:L393,(MONTH(Data!C2:C393)=MONTH(DATEVALUE(Master!Criteria&" 1")))*(Data!L2:L393=Master!L3)*(Data!B2:B393=Master!B3)*(Data!K2:K393=Master!H3)),CHOOSE({1,2,3,4,5},INDEX(f,,3),"",INDEX(f,,11),"",INDEX(f,,12)))
    Thanks mam its work awesome

  14. #14
    Forum Contributor
    Join Date
    04-18-2014
    Location
    Pune, India
    MS-Off Ver
    Excel 2021
    Posts
    121

    Re: Dynamic filter function by month

    Quote Originally Posted by Glenn Kennedy View Post
    So...

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you sir, its work perfectly but instead of dealer name i want company name in column L8

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Dynamic filter function by month

    Mine gives the same answer as Alis... IMPEL... and the header says Dealer Name, so I assumed you wanted the Dealer Name!!!

    Since they give the SAME answer, how can hers be correct and mine incorrect??

    Which column from the raw data do you want returned in L9... under the header "Dealer Name".

    Please explain specifically which raw data column you want to have returned!!!!

  16. #16
    Forum Contributor
    Join Date
    04-18-2014
    Location
    Pune, India
    MS-Off Ver
    Excel 2021
    Posts
    121

    Re: Dynamic filter function by month

    Respected sir,

    I've no doubt in your formula my only desire is to filter company name in column L9
    Last edited by AliGW; 05-30-2023 at 10:35 AM. Reason: Please do NOT quote unnecessarily!

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Dynamic filter function by month

    Once again, you did not directly answer my Q. If it is column B that you want in L9, change the formula to:

    =LET(F,Data!A2:L393,A,FILTER(F,(EOMONTH(+INDEX(F,,3),-1)+1)=DATE(P3,MONTH(D3&1),1)*(INDEX(F,,2)=B3)*(INDEX(F,,11)=H3)*(INDEX(F,,12)=L3)),CHOOSE(SEQUENCE(,5),INDEX(A,,3),"",INDEX(A,,5)&"","",INDEX(A,,12)))

    The &"" removes 0s when NO NAME is present.
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    04-18-2014
    Location
    Pune, India
    MS-Off Ver
    Excel 2021
    Posts
    121

    Re: Dynamic filter function by month

    Respected Sir,

    again thank you so much for your help and now i feel that you're a problem solver machine. its perfectly working

+ 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: 4
    Last Post: 03-21-2023, 05:54 AM
  2. Replies: 10
    Last Post: 03-22-2022, 12:15 PM
  3. Help with Filter Function from a dynamic data set with formulas
    By Subidai in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-16-2021, 09:54 AM
  4. [SOLVED] Sumproduct Function with Month and Year Filter
    By Zenly in forum Excel General
    Replies: 6
    Last Post: 11-22-2019, 11:18 AM
  5. Replies: 4
    Last Post: 10-12-2018, 01:04 PM
  6. [SOLVED] Create dynamic rolling 3 month data that increases in one month increments
    By v_pilling in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-24-2017, 01:33 PM
  7. Using filter function to select more than one month
    By shivams22 in forum Excel General
    Replies: 2
    Last Post: 02-19-2014, 05:12 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