+ Reply to Thread
Results 1 to 18 of 18

Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

  1. #1
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Hi ALL,

    I'm using the formula below and its always returning a value of 1 when it should be 0. I've tried different options to generate but this seems to be the best way. What am I missing here?

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by halimgunawan; 11-25-2024 at 12:24 AM.

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

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    You forgot to attach a sample workbook.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    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 (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,303

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    To clarify the need for a workbook: there is no way to troubleshoot this long formula without knowing what it is referring to. We have no idea what's in the ranges and cells referenced, so it's impossible to tell you why it's not doing what you want.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,596

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Your FILTER will return an error if there is no matching data. Hence, what you see is a count of the error message, that is, one row (probably #CALC).

    You would need to test for the FILTER returning an error. Might be better if you used the last parameter of the FILTER to return "No Data". Then you'll know what to test for.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    sorry I forgot the sample data..here it is..
    I also have another question on the file. Pls help alook, Thanks in advance.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    You would probably be better off using PivotTable. Easy to set up and use.

    And with slicers, you can do multiple selections easily and have better visualisation.

  7. #7
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Hi Josepteh,

    yes, I know, but due to the certain circumstances. I have to use the way it is.
    the pivotable option unable to solve any duplicates.

  8. #8
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,941

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Try this,
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Hi Windknife,


    Thanks, but if I choose company Z, Dept ANS the result become, #REF!?
    can it still show the table with value 0 ?

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,303

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Try this (untested):

    Please Login or Register  to view this content.

  11. #11
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,941

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Try this,
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Thanks windknife, AliGW,

    another question and it is the last.
    I have another question on the file. Could you pls help to check on it?

    if I choose the month Jun, how to show Jan-June?
    also how to show the Mar: 0, May: 0, which not on rawdata?

  13. #13
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,941

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Try this,
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    it works windknife...many thanksssssss....

  15. #15
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Add a helper column in MasterData with this formula:=IF(COUNTIFS(C$1:C6,[@Participant],J$1:J6,[@Year],K$1:K6,[@Month])>1,"Yes","No").

  16. #16
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,941

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    You are welcome.

  17. #17
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Hi Windknife,

    I realized that the formula return to the wrong numbers when I select company: Z, dept: ALL, training topics: ALL, month: Jan

    it should be 19 right? but it shows 124.
    which part should I revise? many thanks in advance.
    Attached Files Attached Files

  18. #18
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,941

    Re: Returning 1 when it should be 0 ROWS UNIQUE FILTER Function

    Amended formula,
    Please Login or Register  to view this content.

+ 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] COUNTA(UNIQUE(FILTER is returning 1 when should be 0
    By excel760 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-24-2024, 10:07 PM
  2. [SOLVED] Filter Function Returning #Value! Error
    By Ian McPherson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-12-2024, 09:28 PM
  3. UNIQUE(FILTER is returning a duplicated reurn,
    By pmw19800 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-12-2024, 08:14 AM
  4. FILTER Function only returning top 10 results?
    By Shodan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-03-2021, 10:27 AM
  5. [SOLVED] VBA Filter Function Returning Same Values
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-10-2015, 02:47 AM
  6. Replies: 2
    Last Post: 02-06-2013, 04:44 AM
  7. Filter not returning unique values
    By spalermini in forum Excel General
    Replies: 15
    Last Post: 04-29-2009, 11:39 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