proportion formula google sheets - google-sheets

im am still doing my google sheets test and need help finding the answer to the question: what proportion of products are discontinued. i have to express my answer in a formula on google sheets
you can find the link to the data stack here:
products list:
https://docs.google.com/spreadsheets/d/1m67VmLZispyTwFTmPdppsdJNtbvnZsZK2LBCSchUWmU/edit?usp=sharing
my idea was to count the 0 in the column J(discontinued) with the formula: =Countif(J2:J78,"0"). in the next step i would have to show a proportionality and i have no clue how i am supposed to do that. could anyone tell me if the first step is correct and how i should go about the proportionality?
thank you!!

You can also use the formula PERCENTIF:
Returns the percentage of a range that meets a condition.
PERCENTIF(range, criterion)
In this case if you want to know the percentage of 0 this would be:
=PERCENTIF(J2:J78;"0")

You do not need any formula, just build a pivot table

Related

Array Formula not auto-filling in Google Sheets? [Example Provided]

I have a spreadsheet that will not auto fill my array formula. Can someone please explain what I might be doing wrong on this? Example Spreadsheet (Editable)
Essentially, I'm looking through a messy tag field trying to pull out the important tag I need displayed in a separate cell. I want this done automatically so I don't have to keep pulling down my formula every morning to update the ticket sales pivot report.
A1: fe220608-dcba-12p,mg220606-dcba,reg_confirm_sms_test,confirmation_sms_mc-guidebook,mailed_v2-guidebook,preview_reminder_call_1st_attempt,phase-preview-attendee,phase-preview-buyer,product_path_quickstart,product_workshop_registration,pb,me220624-dcba,pb_mg220606-dcba,pp_2023_pre_sale,pp-2023_guest-ticket_platinum,**pp-2023_ticket_platinum**,branding_package,branding_ob_form_finished,2022_webinar_test1_group,unsubscribed_mfcp-investor-related
(I want to pull out that Platinum tag, and put it in a separate column)
Formula: =ArrayFormula(IFERROR(INDEX({"pp-2023_ticket_general-seating","pp-2023_ticket_general-admission","pp-2023_ticket_silver","pp-2023_ticket_gold","pp-2023_ticket_platinum"},MATCH(TRUE,ISNUMBER(SEARCH({"pp-2023_ticket_general-seating","pp-2023_ticket_general-admission","pp-2023_ticket_silver","pp-2023_ticket_gold","pp-2023_ticket_platinum"},A2)),0)),""))
Expected Result:
**pp-2023_ticket_platinum**
Please let me know if there is an easier way to automate this.
use:
=ARRAYFORMULA(BYROW(A2:A, LAMBDA(x, IFERROR(INDEX({
"pp-2023_ticket_general-seating","pp-2023_ticket_general-admission",
"pp-2023_ticket_silver","pp-2023_ticket_gold","pp-2023_ticket_platinum"},
MATCH(TRUE, ISNUMBER(SEARCH({
"pp-2023_ticket_general-seating","pp-2023_ticket_general-admission",
"pp-2023_ticket_silver","pp-2023_ticket_gold","pp-2023_ticket_platinum"}, x)), ))))))

Google Sheets Percentage Formula with multiple variables

I am wondering if someone with Google Sheets expertise can help me figure out how to write a formula to find percentages based on 2 parameters.
For Example, please see screenshot below, we want to figure out what percentage of the cost is included(Y/N) within each fruit (oranges/apples). What would be the best formula to solution for this?
Thank you!
Thanks in advance!

Google Sheets Array Formula Match on Multiple Conditions, 1 being date that is less than or equal to

I am hoping someone can help me out.
I have 2 different datasets and I am hoping to replicate something like the maxifs function using an arrayformula so that I only need 1 formula and do not need to drag it down.
What I would like to do is return a value that matches a name, and the date is less than or equal to a date in the column. Basically the most recent value that matches those criteria.
I have added a picture below
DEMO FIXED
The maxifs formula I am trying to replicate in this case is: =maxifs(I:I, A:A, G:G, H:H, "<=" & B:B)
Sample Sheet: https://docs.google.com/spreadsheets/d/1mMMT1JbBMTAM0togUFQtctpY5FKzgVaP2_YKnALoHAE/edit?usp=sharing
Thank you in advance.
UPDATE:
I have this formula
=arrayformula(if(len(A2:A), vlookup(A2:A&B2:B, {H2:H&I2:I, J2:J}, 2, false),))
Which almost does what I want, however if there is no date matching i need the value from the next most recent date. Instead this returns an error.
Your new goal has nothing to do with your post. Your image values don't match your sheet, and you don't want a max or equivalent to MAXIFS at all now. So the entire post will be confusing to other contributors and future site visitors. Consider spending adequate time to rework your post question, image and spreadsheet to accurately reflect your new goal in a unified way.
That said, I've added a new sheet ("Erik Help") with a formula highlighted in green which accomplished your new goal as I understand it:
=ArrayFormula(IF(A2:A="",,VLOOKUP(A2:A&"~"&B2:B,SORT({G2:G&"~"&H2:H,I2:I},1,1),2,TRUE)))
ADDENDUM (based on additional comment from OP):
I've modified the formula as follows:
=ArrayFormula(IF(A2:A="",,IFERROR(IF(REGEXEXTRACT(VLOOKUP(A2:A&"~"&B2:B,SORT(G2:G&"~"&H2:H),1,TRUE),"(.+)~")<>A2:A,"no match",VLOOKUP(A2:A&"~"&B2:B,SORT({G2:G&"~"&H2:H,I2:I},1,1),2,TRUE)))))

Handling Index Minimum Formula with Duplicated

I tried searching the web for a solution but couldn't really find anything helpful. I am not a pro with google sheets formulas and I am running into an issue with the index/minimum function.
[Please view the screenshot of my google Sheet here][1]
So basically what I am trying to do in cell B14 is to show me the alias/name with the least amount open revenue (column B). There are duplicates in that column (more than one alias has $0.00), but the formula will only show me the first alias in the name with that value and ignoring all other duplicates...Is there a way to solve this and maybe show all alias/names in one cell that have that minimum value?
try:
=JOIN(", "; FILTER(A3:A8; B3:B8=MIN(B3:B8)))

Using =GetPivotData in GoogleSheet to get specific Grand Total

I'm trying to use =GetPivotData formula to dynamically pull specific sum totals (40% & 80% Sell-Out Probability in my example) into a table. I may not fully understand how to use the formula, but everything I've tried has returned an error.
Sample Sheet
This formula seems to pull the answer you want, if I understand your question.
=GETPIVOTDATA("SUM of Sales",H2,"Sell-Out Probability","40%")
This would go in N8 of your sample sheet.
N9 would have the same formula, but with "80%" as the last value.
Let me know if this helps.

Resources