=IFERROR(SMALL(IF('Fact'!$G$2:$G$19607=1,'Fact'!$AB$2:$AB$10000),ROW()-2),"")
This formula is for a column and this is the excel formula breakdown:
The formula finds the nth smallest value in column AB where the corresponding value in column G is 1, and handles errors by returning an empty string if no such value exists.
Please check if this formulas workflow is correct? I don't have the data to check its validity, so I would really like someone's help to know if it is correct. Or suggest changes or better solution if possible.
1. Input Data:
Use an Input Data tool to bring in your dataset from the "Fact" sheet, including columns G and AB.
2. Filter Tool:
Use a Filter Tool to apply the condition specified in the formula.
Filter Expression: [G] = 1
This filter will retain rows where column G is 1.
3. Sort Tool:
Use a Sort Tool to sort the filtered data by column AB in ascending order.
This step organizes the data to facilitate finding the nth smallest value.
4. Sample Tool:
Use a Sample Tool to select the nth row from the sorted data.
Configuration: Set the tool to skip the first n-1 rows and take the next row.
5. Formula Tool for Error Handling:
Add a Formula Tool to handle cases where the nth value does not exist.
Formula Logic:
IF ISNULL([AB]) THEN "" ELSE [AB] ENDIF
This formula assigns an empty string if the nth value is not found.