Google Sheets ArrayFormula to Compare Multiple Cells from Different Rows - if-statement

I'm making a checklist of Disney Blu-rays. Some Disney movies are available in 4K but some are not. I'm trying to create a column that will show if a movie release is available in a higher quality than the entry for that row.
Here is a simplified test sheet that should hopefully make my goal more clear...
https://docs.google.com/spreadsheets/d/1L2-npiEdTE9ardDi2q38sYhkKRFKAPCu_gtJFbOZa80/edit?usp=sharing
I've found a ton of ways to compare rows, look for duplicates, etc. But despite my limited but best efforts, I can't find a way to combine what I've found in a way that works towards this goal. The best I've been able to do is find duplicate titles but I've not been able to compare that against the Original Theatrical Release Year, and Blu-ray vs 4K release columns.
I'd like to do this through an ArrayFormula so that any rows I add are easily and automatically rendered into the formula without any extra work. Any help would be greatly appreciated! Thank you.

Here's my take on this:
=ArrayFormula(IFS(A3:A="",,COUNTIFS(A3:A,A3:A,B3:B,B3:B,D3:D,"4K",ROW(A3:A),">"&ROW(A3:A))*(D3:D<>"4K"),"Yes",1,"No"))
I'm not sure if I fully understood the task but the above formula seems to give the correct result.

try:
=INDEX(LAMBDA(a, b, c, d, LAMBDA(x, IF(a="",,
IF(IFERROR(x, "No")="No", "Yes", "No")))(VLOOKUP(a&d,
{FILTER(FILTER(a&d, b), NOT(COUNTIF(FILTER(a, c), FILTER(a, b))));
FILTER(FILTER(a&d, c), COUNTIF(FILTER(a, b), FILTER(a, c)))}, 1, )))
(A3:A&B3:B, C3:C="Blu-ray", D3:D="4K", ROW(B3:B)))

Related

Maximum over 7 columns in Quicksight

I have a very simple problem, but unable to find a way to solve it in Quicksight.
I have data in the below form.I just want to compare the different columns(marks of different weeks) and print out the highest in a new column.
I have tried using the "Max" function, but seems like we can use it only for a specific column,
The output should look like:
Any help is appreciated.
I dont think that we can do aggregate functions across columns like in excel we can do max over range e.g. =max(c1:c5)
I have this work-around, given columns are not too many.
ifelse(
marks_week1>marks_week2,
ifelse(marks_week1>marks_week3,
ifelse(marks_week1>marks_week4,
ifelse(marks_week1>marks_week5, marks_week1, marks_week5),
ifelse(marks_week4>marks_week5, marks_week4, marks_week5)),
ifelse(marks_week3>marks_week4,
ifelse(marks_week3>marks_week5, marks_week3, marks_week5), marks_week4))
, ifelse(marks_week2>marks_week3,
ifelse(marks_week2>marks_week4,
ifelse(marks_week2>marks_week5, marks_week2, marks_week5),
ifelse(marks_week4>marks_week5,marks_week4, marks_week5)),
ifelse(marks_week3>marks_week4,
ifelse(marks_week3>marks_week5,marks_week3, marks_week5),
ifelse(marks_week4>marks_week5,marks_week4,marks_week5)))
)
Also posted on quicksight community as feature request or provide insight in case this exists already.

Extract list from range Google Sheets

I have some data from workplaces with some different work areas, I need to extract a list for each workplace with their corresponding availables working areas, I have an example of some kind of attempt really close what I wanted. I use this formula but with more data will be long time to do it =IF(D2=$G$1, "Yes", "No"). I want to do it more automatic with some formulas but I don't know where to start.
Give a try on below formula. Put the formula to G1 cell then drag down as needed.
=TRANSPOSE(IFERROR(FILTER($D$2:$D$16,$A$2:$A$16=F2,$D$2:$D$16<>""),""))

Getting ticked header values using formula in Google sheets or excel

I have a table where I need to get the values of the ticked headers as shown. The ALL takes precedence and it will include all headers when ticked.
Here is the working copy of the sheet.,
The expected values are shown in the image below.
The purple cells will have formula, H2, H3 and so for for each row.
I have tried with
=TRANSPOSE(FILTER(Config!A$1:A$16,(INDEX(Config!A$1:G$16,,MATCH(2,Config!$A$1:$1,0) ))=TRUE))
delete H:K range and use in H2:
=INDEX(TRIM(SPLIT(FLATTEN(QUERY(TRANSPOSE(IF(B2:B=TRUE, C1:F1&"♦",
IF(C2:F=TRUE, C1:F1&"♦", ))),,9^9)), "♦")))
Code Guy, see if this formula (need to drag down) does what you want:
=IF(B2,{C$1:F$1},IFERROR(FILTER(C$1:F$1,C2:F2),""))
"Brute-forcing" the solution with IFs kinda works, even though it's inelegant and not scalable to larger number of columns. Might be interesting to re-ask the question with an arbitrary number of columns. Pure formula solution might not be possible.

How can I resolve INDEX MATCH errors caused by discrepancies in the spelling of names across multiple data sources?

I've set up a Google Sheets workbook that synthesizes data from a few different sources via manual input, IMPORTHTML and IMPORTRANGE. Once the data is populated, I'm using INDEX MATCH to filter and compare the information and to RANK each data set.
Since I have multiple data inputs, I'm running into a persistent issue of names not being written exactly the same between sources, even though they're the same person. First names are the primary culprit (i.e. Mary Lou vs Marylou vs Mary-Lou vs Mary Louise) but some last names with special symbols (umlauts, accents, tildes) are also causing errors. When Sheets can't recognize a match, the INDEX MATCH and RANK functions both break down.
I'm wondering how to better unify the data automatically so my Sheet understands that each occurrence is actually the same person (or "value").
Since you can't edit the results of an IMPORTHTML directly, I've set up "helper columns" and used functions like TRIM and SPLIT to try and fix instances as I go, but it seems like there must be a simpler path.
It feels like IFS could work but I can't figure how to integrate it. Also thinking this may require a script, which I'm just beginning to study.
Here's a simplified example of what I'm trying to achieve and the corresponding errors: Sample Spreadsheet
The first tab is attempting to pull and RANK data from tabs 2 and 3. Sample formulas from the Summary tab, row 3 (Amelia Rose):
Cell B3: =INDEX('Q1 Sales'!B:B, MATCH(A3,'Q1 Sales'!A:A,0))
Cell C3: =RANK(B3,$B$2:B,1)
Cell D3: =INDEX('Q2 Sales'!B:B, MATCH(A3,'Q2 Sales'!A:A,0))
Cell E3: =RANK(D3,$D$2:D,1)
I'd be grateful for any insight on how to best index 'Q2Sales'!B3 as the correct value for 'Summary'!D3. Thanks in advance - the thoughtful answers on Stack Overflow have gotten me this far!
to counter every possible scenario do it like this:
=ARRAYFORMULA(IFERROR(VLOOKUP(LOWER(REGEXREPLACE(A2:A, "-|\s", )),
{REGEXEXTRACT(LOWER(REGEXREPLACE('Q2 Sales'!A2:A, "-|\s", )),
TEXTJOIN("|", 1, LOWER(REGEXREPLACE(A2:A, "-|\s", )))), 'Q2 Sales'!B2:B}, 2, 0)))

Power BI Filtering issue caused by If statement measures

Apologies up front, this is going to take a second to explain but I'd rather be thorough so the problem is clear. The main problem that I am having is that people are not being properly filtered out of a matrix that I am using and I believe I have isolated the problem to some measures that I have written. Below is a picture of what I'm working with (I guess you'll have to follow the link):
My problem is that when I try to apply a filter using the slicer, you would expect the available names to be filtered out of the matrix based on if they fall under the particular team leader or director selected. However, they do not, as seen in this picture:
Clearly, people are not being filtered out because there are still values in the AnswerRatePass column and the SurveyScorePass column. I will focus on just AnswerRatePass to cut the problem in half. The purpose of AnswerRatePass is to output text to identify if the Answer Rate of a person exceeded their goal, met the goal, or missed the goal. My code for AnswerRatePass is:
AnswerRatePass = if([AnswerRateGoal] = 1,"Exceed",
if([AnswerRateGoal]=0,"Achieved","Missed"))
As you surely noticed, [AnswerRatePass] is using the value of [AnswerRateGoal] to determine what to do. I use this because it sort of simplifies the code for my Recommendation measure, which assesses if a person met their goals for both criteria, meaning we suggest to promote this person, or what their case is. My code for AnswerRateGoal is:
AnswerRateGoal =
if(ISBLANK([AnswerRate]),0,
if(values(TMD[Title])="Executive",
if([AnswerRate]>=.94,1,
if([AnswerRate]>=.92,0,-1)),
if(values(TMD[Title])="President's Club",
if([AnswerRate]>=.96,1,
if([AnswerRate]>=.94,0,-1)),
if([AnswerRate]>=.96,0,-1)
)))
If these measures (AnswerRatePass, SurveyScorePass, and Recommendation) are removed from the matrix, the slicers work exactly as expected. So, long story short, what I'm pretty sure I need is some sort of filter for these measures so that these values will disappear when using a slicer that doesn't apply to that person, allowing the individual person to also be filtered out by the slicer as well. Unless someone has a different idea, I'm pretty sure that's what I need but I haven't been able to come up with a way to do it. I'm open to any help/suggestions.
Yep, I've seen this before. I think what you want is for AnswerRatePass to return a blank if AnswerRate is blank. Try something like this:
AnswerRatePass =
IF(
ISBLANK([AnswerRate]),
BLANK(),
IF(
[AnswerRateGoal] = 1,
"Exceed",
IF(
[AnswerRateGoal] = 0,
"Achieved",
"Missed"
)
)
)
Side note: The SWITCH function is often a cleaner approach then nested IF functions.