=4.SORT(3.IFERROR(IFERROR(2.INDEX(UNIQUE(FILTER(Source[BATCH];(Source[DESTINY 2]="2")));MATCH(UNIQUE(FILTER(Source[BATCH];(Source[DESTINY 2]="2")));UNIQUE(FILTER(Source[BATCH];(Source[√2]="√")));0));
1.INDEX(UNIQUE(FILTER(Source[BATCH];(Source[DESTINY 2]="2")));;)); " " );1)
This formula is a nested IFERROR and INDEX function that returns the value of the first cell in the column BATCH of the table SOURCE where the value in the column DESTINY 2 is equal to 2.
If there is no such cell, it returns the value of the first cell in the column BATCH of the table SOURCE where the value in the column √2 is equal to √. If there is no such cell, it returns an empty string.
The IFERROR function is used to handle errors that may occur in the INDEX function. If the INDEX function returns an error, the IFERROR function returns the value 0.
SORT(array, [sort_index], [sort_order], [by_col])
Sorts the result in an ascending manner when you apply "1" on [sort_index].
At our table:
Destiny 2 |
---|
2 |
6 |
UNIQUE (array, [by_col], [occurs_once])
The formula: "UNIQUE(FILTER(Source[BATCH]; (Source[DESTINY 2]="2")))", returns
At our table:
Destiny 2 |
---|
6 |
2 |
FILTER(array, include, [if_empty])
The formula: "FILTER(Source[BATCH];(Source[DESTINY 2]="2"))", returns
At our table:
Destiny 2 |
---|
6 |
2 |
2 |
INDEX(array, row_num, [col_num], [area_num])
The formula: "INDEX(UNIQUE(FILTER(Source[BATCH]; (Source[DESTINY 2]="2")));)", excluding for now "row_num" (");)"), returns
At our table:
Destiny 2 |
---|
2 |
6 |
The formula 2) : "INDEX(UNIQUE(FILTER(Source[BATCH]; (Source[DESTINY 2]="2"))); MATCH(UNIQUE(FILTER(Source[BATCH]; (Source[DESTINY 2]="2"))); UNIQUE(FILTER(Source[BATCH]; (Source[√2]="√")));0))", , returns
At our table:
Destiny 2 |
---|
#CALC |
#CALC |
MATCH(lookup_value, lookup_array, [match_type])
Cells of the column "Destiny 2" will become empty as soon as the cells of the column "√2" has a "√", applying the formula: IF(COUNTIFS([√2];"="&"√";[BATCH];[@BATCH])>=1;"").
At our table:
Destiny 2 |
---|
#CALC |
#CALC |
IFERROR(value, value_if_error)
Used twice. The first it returns "empty", if error, and in the second it will calculate the formula: INDEX(UNIQUE(FILTER(Source[BATCH]; (Source[DESTINY 2]="2")));;)) if 2) returns an error.
At our table:
Destiny 2 |
---|
6 |
2 |