Why make grouping in ascending or descending order in Table Data not show properly smaller to greater than - uitableview

Ascending and Descending Making Groups
Why Java Table not showing properly greater to smaller than or smaller to greater than values

Related

How do I create a list of non-repeating cells/numbers in Google Sheets?

I’m trying to emulate Minesweeper in Google Sheets, and for this I want to create a second map adjacent to the first with all of the correct values already in it. To randomize bomb position, I need a list of random numbers or cells(cells would be preferable). However, I cannot figure out how to do this without ending up repeating numbers. The result would ideally be a vertical array of cell coordinates. Thank you!
Answer
The following formula should produce the result you desire:
=SORTN(FLATTEN(MAKEARRAY(10,10,LAMBDA(row,col,ADDRESS(row,col)))),20,,RANDARRAY(100),)
In =MAKEARRAY, change the first 10 to adjust how many rows to randomly choose from, or the second 10 to adjust how many columns to choose from. The value in =RANDARRAY must be equal to the product of the number of rows and the number of columns. (e.g. in the above example, 10*10=100).
Change the 20 to adjust how many randomly chosen values to return.
Explanation
=MAKEARRAY is used to generate an array of every possible row and column combination. It accepts a =LAMBDA, which in this case is just the =ADDRESS function. The first two arguments of =MAKEARRAY determine how large the array should be, which is why changing them adjusts how many rows/columns to randomly pick from.
Then, the result of =MAKEARRAY is squashed into a single column using the =FLATTEN formula.
Finally, the entire thing is sorted randomly using =SORTN combined with =RANDARRAY. =SORTN also limits the number of results that are returned dependent on its second argument, which is why changing it adjusts how many results are returned.
If you want information on how to "freeze" the value of =RANDARRAY so it doesn't recalculate each time you change something, check out this question by player0.
Functions used:
=MAKEARRAY
=LAMBDA
=ADDRESS
=FLATTEN
=SORTN
=RANDARRAY

Conditional formatting at row level

I have 2000 rows of cost price data. In each row, I would like to apply a color scale to quickly highlight cost prices (from low to high). However, I would like the color scale comparison logic each time to be applied within a specific row. So row 12 data should not be compared to row 13 data for instance. How can I do this without creating 2000 rules stipulating each row?
I have done it for the first row as below:
D3:BL3
However, when I try $D3:$BL2000 and hit "Done" the $ signs just disappear meaning the formatting logic isn't applied at row level but all rows (so e.g. row 4 is compared to e.g. row 100).
You can't have a conditional formatting with scale color row by row with Google Sheets option. You can simulate it with the help of MIN, MAX and QUARTILE. Here you have an example:
=(D1=MAX($D1:$Z1))*(D1<>"")
=(D1>QUARTILE($D1:$Z1,3))*(D1<>"")
=(D1>QUARTILE($D1:$Z1,2))*(D1<>"")
=(D1>QUARTILE($D1:$Z1,1))*(D1<>"")
=(D1>MIN($D1:$Z1))*(D1<>"")
=(D1=MIN($D1:$Z1))*(D1<>"")
PS: remember to sort accordingly the rules. In the top the highest values (in green in my example) and in the bottom the lowest values
PPS: you could do something similar with the help of RANK or LARGE/SMALL, depending on your data

How to show rows with null value when doing data blending in Tableau

I am connecting to the same data source twice in order to do a variance analysis in Tableau. Each cycle applies different filters. But when I did data blending on those two datasources, Tableau exclude all rows with null values in the table (those appear in the primary table but doesn't have value in the secondary table). So how to show those rows with null value?
try putting the column having the smallest level of detail as the last column in the columns, then hide it's header (this will hide the column, but its effect on the level of detail will stay there). this will enable to make the null values observable.

Find the largest three numbers in a row

Can anyone guide me in finding the three largest values, and sum them up in the column "I"?
And also need to highlight the top three values in each row.
For example, in this image, I want to find the largest three from D,E,F,G columns in each row and SUM of largest three should be filled in column "I".
You can use the large formula,
I'm sure there is a better way, but if there is an error you can use the iferror() so if there is an error the value will show up as 0.
=IFERROR(LARGE(D2:G2,1),0)+IFERROR(LARGE(D2:G2,2),0+IFERROR(LARGE(D2:G2,3),0))

Improving a Spreadsheet Formula to be more dynamic

I have a a couple sheets that I want to filter the values of and sum them together. I have a working function:
=SUM(INDEX(Grades!M32:V32,0,B2)+INDEX(Grades!M32:V32,0,C2)+INDEX(Grades!M32:V32,0,D2)+INDEX(Grades!M32:V32,0,E2)+INDEX(Grades!M32:V32,0,F2)+INDEX(Grades!M32:V32,0,G2))
and this is working fine. The problem is it isn't really dynamic and I was wondering if there was a more efficient way to approach this instead of using so many Indexes.
Index is grabbing a horizontal range of numbers from another sheet and getting the needed index position from a small table in another sheet.
Update
I was able to get the formula working how I wanted by inserting an IF statement that would not do the VLOOKUP if one of the cells was empty.
=ArrayFormula(SUM(IF(B2:I2 <> "",VLOOKUP(1,{1,Grades!$M$32:$V$32},B2:I2+1))))
It looks a bit strange, but this is one way:
=ArrayFormula(SUM(VLOOKUP(1,{1,Grades!M32:V32},B2:G2+1,0)))
In the VLOOKUP, 1 is the value you are searching for, {1,Grades!M32:V32} is the array in which you are searching, B2:G2+1 is the column index (or rather, indices) you wish to return, and 0 dictates that you require an exact match.
{1,Grades!M32:V32} constructs a horizontal, one-row array that has 1 in the left-most element, with the values in Grades!M32:V32 to the right of it.
VLOOKUP will search down the left-most column of that array. It will always "find" the 1 that it is searching for in the left-most column, because we have purposely manufactured that.
Where the action really happens is in the third argument, where we return the columns in that manufactured array corresponding with the values in B2:G2 (I should add, I assumed that all cells in B2:G2 are populated - it will return the wrong result if any are blank). The +1 is to account for the extra element (the 1) we tacked on to the left of the lookup array.

Resources