Anyone got a good form to count distinct values in a table with conditions? I can use countifs to get the total number of rows but I also need one that gives me a number of distinct values in another column.
Eg countifs(Foods[[#All],[Breakfast], ""Apple"] gives how many rows have apple for breakfast but I also want to a number of how many distinct values (e.g. customer column) match this condition. ChatGPT says to use sum with the column I'm checking but the result is definitely wrong.

like
Posting as :
works at
You are currently posting as works at

=COUNTA(UNIQUE(FILTER(range,(condition1=criteria1)*(condition2=criteria2))))

Lemme know if something isn’t clear in the formula above

like

Gonna save me so much time now lol. I’ve been manually changing filters on a pivot table to get each number and now I just can copy the columns into a table that tracks this over time. At some point I’ll just add a column for a timestamp of each report and not deal with having to replace the input data, just filtering each row of that report on the date.

like

=SUM(1/COUNTIFS(Findings[[#All],[Operating System]],"*Windows*",Findings[[#All],[Operating System]],"<>*Server 2008*”,Findings[[#All],[UUID]],Findings[[#All],[UUID]]))

Is the function im getting. I’m looking for a count of distinct UUIDs that are windows but not server 2008. It looks like it tries to divide by 0 in some rows and fails

So I ended up redoing all this in PowerBI (excel prob would also work since it’s all Dax/m, powerquery, and the data model but I needed to share reporting too) and doing a lot of this with related tables has worked a lot more nicely. The solution I was using within excel worked for the single time period where I was testing lol. Shortly after, server 2012 hit end of life and I would have needed a new query for it.

Now I’m just storing the EOL date in a table and comparing it to a reporting date.

Looks like you’re almost there.. =SUM(1/COUNTIF(range, range)) should work as long as you turn it into an array formula by using the CTRL + SHIFT + ENTER keys

I did try that but it turned out my RDP client was not sending one of the keys correctly (iPad connected to a windows desktop so I can use the data model stuff ) but I’m still getting the div/0 stuff after working around that. If I had an empty column somewhere Itd make sense but the columns I’m checking are all populated.

Probably should try this with a smaller subset of the data lol

Related Posts

I teach British Lit. For anyone else who teaches this, what are some of your favorites to teach? I have been doing Beowulf, The Canterbury Tales, Macbeth, Etc., but want to add something new this year

like

Is it worth it to exit for pharma sales? I know some people have made the switch. The money is tempting but I can't help wondering if it's just a "grass is greener" situation

like

What is the starting salary for an entry-level Procurement Coordinator in SF?

like

What is market standard for pega dev with 8 yrs of exp,?
What should minimum and maximum can get?

like

So, recently got put on a PIP after six months at my new job., two days after I told my boss and HR I recently learned I have a cognitive disability caused by an illness. The PIP was mostly because I forgot some deadlines, but also they said I need to be more professional in emails (even though others use zero punctuation and a lot of emojis. To clients.) and simultaneously ask more questions and ask fewer questions. Should I just assume this is unattainable and look for a new job again?

like

Colleague said “oh hello, who the fuck are you?” When I brought up what I guess was an unwanted opinion. This was years ago when I was more junior.

Is there any not very expensive black tie gown shops near Toronto downtown? New to the city and office party has black tie dress code!

like

If you had a mentor for your tech career what kind of things would you be most interested in learning about? If you already have a mentor, can you share the most valuable things you have learned?

like

Hi all. I’m a ux designer at a small company and need to recruit a few people for usability testing. Our target demographic is people over the age of 35 who’ve been in leaderships positions. If you’re interested I’ll send the link- the test will take about 15-30 minutes and pays 20$. No human interaction required.

How long is it taking for new joiners to receive their laptops if they asked it to be shipped?

like

im 27 and could possibly retire if I kept my spending low. However you never know what’s going to happen, do you? How do you deal with the uncertainty?

like

Does anyone know how much 1st year associates are making ($$) in tech risk at Goldman Sachs?

like

Hello,
Why there is so much of hatred towards Kyndrl all over . Is it really such a bad company .

like

Hi Everyone!

I am looking at hiring a Sr. Salesforce (Sales and Service Cloud) and Sr. Salesforce (Marketing Cloud) Consultants. They can be based anywhere in North America. If anyone is interested or knows someone who might be. Please shoot me a message or comment below.

PS - Open to Full Time Permanent opportunities or someone looking for contract work is also okay.

likeupliftinghelpful

I give the clients gold, but they decide instead, they want me to paint it with sh*t.

likefunny

What is the salary range for Senior Software Engineer in Oracle India? And can anyone explain the general designation hierarchy in Oracle?

Has anyone taken the CAIA ? Any tips ?

like

Anyone who said no to a prospect because of personal reasons? Going through a rough patch and would really appreciate some advise on how to do it without burning (that many) bridges.

like

Snowbird here, heading down soon. What fun things are happening Labor Day weekend?

Additional Posts in Excel Genius

Anybody use a personal computer for work? How's your experience been, any horror stories/watch-outs?

like

How can I extract just the year into a new cell from a “yyyymmdd” cell (labeled PD here) that isn’t recognized as a date? I basically need to sort this data by year. Thanks in advance!

Post Photo
like

How do I easily find any cells that are hard coded vs formula? I have 10,000 rows of data and column F is supposed to be a formula based on columns C and D, without clicking into all 10k cells in column F how can I make sure formulas are there and not accidentally hand keyed over?

like

Is there a way for me to automate creating columns to do this so I can drag across and create my columns? For example--
1Q2021 2Q2021 3Q2021 4Q2021 2021 1Q2022?

likesmart

Anyone know what these badges are?

Post Photo
likefunny

This is dumb, but. How can I pull and average the numbers in column b associated with the 4 values in column a? So, (sum of all As/total number of As) without filtering?

Post Photo
like

I’m calculating a bunch of totals and averages by category on one worksheet by filtering data in different categories from another worksheet. However, when I change the filters, the previously..(cont)

How do I compare two sheets to make sure they are identical?

like

Has anyone had an issue with index match and lookups returning NA when trying to manipulate data from a password protected workbook?

Anybody know if there is a way to automate a Gantt chart in excel when building out a roadmap? Essentially want to recreate the functionality of ms project because my client does not have project and wants a nice visual for the roadmap

like

Best way to lookup a value with multiple criteria across rows and Columns, for 3 criteria I usually do sum product. Any other tips?

like

Help me save the day: have a massive excel file (600k rows) with duplicate records (column a, b and c are duplicate, not a duplicate if a and b are the same though). How can I filter for just these records? If it didn’t crash excel I could concat into one column, Conditional format for duplicates, and sort by color. What’s a work around?

likehelpful

Does anyone have any tips/tricks for knowing where to plug +1/-1 in a large table with totals across the y and x axis that contain un-rounded numbers? Every time I fix a row I throw off a column or my check figures to the true data source.

Post Photo
like

What’s the keyboard shortcut to get into the “insert options” dialogue when you’ve inserted a new row with Ctrl+Shift+Plus?

like

I’m referencing a cell (numeric) to a text cell. Is there a way to format that number to include commas? See example in comments.

After I set a print area, how do I showcase the page 1 - page x in the excel sheet and have the background be grey?

How do I look up values from a column in a row? E.g. Values in A1:A6 in B2:F2?

like

Client sent over a 90 MB model this evening. Took 10 minutes to open and a fraction of that to crash. Can’t wait for tomorrow 😭

like

What’s the best way to summarize multiple amortization schedule. I have each schedule on a separate tab. On a master sheet can I do something where I can input a specific month and show my ST/LT ...

like

Recently made a job switch and have been using a lot more excel. Any free resources to help build a solid foundation / fee based courses to help improve my skills?

like

New to Fishbowl?

Download the Fishbowl app to
unlock all discussions on Fishbowl.
That was just a preview…
Sign Up to see all discussions
  • Discover what it’s like to work at companies from real professionals
  • Get candid advice from people in your field in a safe space
  • Chat and network with other professionals in your field
Sign up in seconds to unlock all discussions on Fishbowl.

Already a user?
Login here

Share

Embed this post

Copy and paste embed code on your site

Preview

Download the
Fishbowl app

See what’s happening in your industry
from the palm of your hand.

A phone with Fishbowl app

Scan your QR code to download
Fishbowl app on your mobile

Download app

Sign up for free to view this conversation on Fishbowl

By continuing you agree to Terms of Use and Privacy Policy

Already have an account? Log in

Sign up for free to continue using Fishbowl

By continuing you agree to Terms of Use(New) and Privacy Policy(New)
Messaging rates may apply

Already have an account? Log in

For account settings, visit Fishbowl on Desktop Browser or

General

Legal