Maximum over 7 columns in Quicksight - amazon-web-services

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.

Related

Google Sheets ArrayFormula to Compare Multiple Cells from Different Rows

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)))

Power BI How to return a column with different data type summarized

My question is: Is there a way to return a column in a Matrix with different data types to be summarized as shown in the picture?(Using SWITCH)
I am not sure if this has been phrased in this way before but hopefully someone knows a simpler solution than what I've tried.
Im trying to return a column in a Matrix with different data types to be summarized. I have tried something similar in transform data to the following.
MixedFormatColumn = SWITCH('Cars'[Attribute],
"Socks",CONVERT('Socks'[Value],STRING) ,
"Paper",FORMAT('Paper'[Value], "#,0.0" ) ,
"Plastics",FORMAT('Plastics'[Value], "$#,0" ) ,
CONVERT('Crayons'[Value],STRING)
)
Although not exact, im sure you get the idea. I just keep getting stuck not sure if its an Power Query or a Measure issue and really not sure how to go about this. If someone could at least point me in the right direction it would be greatly appreciated. Thank you whomever is reading this for your time.
A column or a measure cannot have mixed data types or mixed formatting. In order to get the $ value of socks sold, you would need the $ value for the sale. In order to get a count of socks sold, you would need a number, unless you want to count the rows for socks, but a row might be about more than just one pair of socks.
Mixing percentages into all this in one single matrix column is not possible. You may want to rethink your approach.

AWS Quicksight calculated fields gives incorrect result for simple division

I have a dataset with fields targeted and opens and I need to add calculated field opens per targeted which essentially means doing simple devision of those 2 values.
My calculated field is as follows
{opens}/{targeted}
but then displaying simple table with values they are completely incorrect
If I try any other operator like + * etc calculations are correct.
I'm completely out of ideas on how to debug this. I've simplified the dataset to just columns of targeted and opens, can't get any simpler.
Had the same problem, I fixed it by wrapping the columns with the sum() function. Like this:
sum({opens})/sum({targeted})
I think you need to make AWS understand that you are working with float numbers.
1.0*{opens}/{targeted}
if still not working try also
(1.0*{opens})/({targeted}*1.0)
it should give you the desired output (not tested, let me know if it doesnt work)

Formula Moving Data To Second Page If Criteria in Range is Met

I'm working on a Google Sheet Project that will move data from one page to another. I need the formula to search a range ( 'Booth Placement'!O2:O1000=133), if a cell is equal to the set value it will then write the data from the same row 'Booth Placement'!A2:A1000.
I know the IF can only work for one column and not a range spanning multiple columns. What should I switch the formula below?
=IF('Booth Placement'!O2:O1000=133,'Booth Placement'!A2:A1000,"")
I am trying to keep this formula as simple as possible since I will have to change the value it is searching for on each cell on the second page. I've googled this for two days and I'm pretty sure I'm just missing the obvious. Any/All Help is appreciated.
try:
=FILTER('Booth Placement'!A2:A1000; 'Booth Placement'!O2:O1000=133)
or:
=ARRAYFORMULA(IF('Booth Placement'!O2:O1000=133; 'Booth Placement'!A2:A1000; ))

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)))