-
-
Notifications
You must be signed in to change notification settings - Fork 0
Decision.TOPSIS
Rodrigo Celso de Lima Porto edited this page Jan 13, 2026
·
1 revision
This function applies the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method in order to rank alternatives based on multiple criteria. It normalizes the data, applies weights, calculates the distance to the ideal and anti-ideal solutions, and computes a Closeness Coefficient (CC) for each alternative. The result is a ranked table of alternatives.
Decision.TOPSIS(
tbl as table,
alternativesColumn as text,
weights as record
) as table-
table: The input table containing alternatives and their evaluation across multiple criteria. -
alternativesColumn: The name of the column that identifies each alternative. -
weights: A record where each field name corresponds to a criterion column in the table, and each field value is the weight (importance) of that criterion.
A ranked table of alternatives ordered by the closeness coeficient (CC).
- The function performs the following steps:
- Normalization of each criterion using Euclidean norm.
- Weighting of normalized values using the provided weights.
- Calculation of Positive Ideal Solution (PIS) and Negative Ideal Solution (NIS).
- Distance to PIS (
$D^{+}$ ) and Distance to NIS ($D^{-}$ ) for each alternative. - Closeness Coefficient (CC):
$CC = \frac{D^{-}}{D^{+} + D^{-}}β$ - Ranking: Alternatives are sorted by CC in descending order. Ties receive the same rank.
- If both
$D^{+}$ and$D^{-}$ are zero, CC is set to 0.5. - This method is widely used in multi-criteria decision analysis (MCDA), especially when criteria have different units or scales.
Ranking alternatives with three criteria.
let
Source = #table(
{"Alternative", "Cost", "Quality", "Speed"}, {
{"A", 300, 80, 60},
{"B", 250, 70, 75},
{"C", 400, 90, 50}
}),
Weights = [Cost = 0.4, Quality = 0.3, Speed = 0.3],
Result = Decision.TOPSIS(Source, "Alternative", Weights)
in
ResultResult
| Alternative | Cost | Quality | Speed | CC | RANKING |
|---|---|---|---|---|---|
| C | 400 | 90 | 50 | 0.74 | 1 |
| B | 250 | 70 | 75 | 0.26 | 2 |
| A | 300 | 80 | 60 | 0.26 | 3 |
- Hwang, C.L. and Yoon, K. (1981) Multiple Attribute Decision Making: Methods and Applications. Springer-Verlag, New York. http://dx.doi.org/10.1007/978-3-642-48318-9
- Madanchian M, Taherdoost H. A comprehensive guide to the TOPSIS method for multi-criteria decision making. Sustainable Social Development 2023; 1(1): 2220. doi: 10.54517/ssd.v1i1.2220
- Binary.Unzip πβοΈ
- DateTime.ToUnixTime πβοΈ
- Decision.EntropyWeights πβοΈ
- Decision.TOPSIS πβοΈ
- List.Correlation πβοΈ
- List.Intercept πβοΈ
- List.Outliers πβοΈ
- List.PopulationStdDev πβοΈ
- List.Primes πβοΈ
- List.Rank πβοΈ
- List.Slope πβοΈ
- List.Variance πβοΈ
- List.WeightedAverage πβοΈ
- Number.FromRoman πβοΈ
- Number.IsInteger πβοΈ
- Number.IsPrime πβοΈ
- Number.ToRoman πβοΈ
- Statistical.NormDist πβοΈ
- Statistical.NormInv πβοΈ
- Table.AddColumnFromList πβοΈ
- Table.CorrelationMatrix πβοΈ
- Table.NormalizeColumnNames πβοΈ
- Table.NormalizeTextColumns πβοΈ
- Table.RemoveBlankColumns πβοΈ
- Table.TransposeCorrectly πβοΈ
- Text.CountChar πβοΈ
- Text.ExtractNumbers πβοΈ
- Text.HtmlToPlainText πβοΈ
- Text.RegexExtract πβοΈ
- Text.RegexReplace πβοΈ
- Text.RegexSplit πβοΈ
- Text.RegexTest πβοΈ
- Text.RemoveAccents πβοΈ
- Text.RemoveDoubleSpaces πβοΈ
- Text.RemoveLetters πβοΈ
- Text.RemoveNumerals πβοΈ
- Text.RemovePunctuations πβοΈ
- Text.RemoveStopwords πβοΈ
- Text.RemoveWeirdChars πβοΈ
- AreArraysEquals πβοΈ
- AutoFillFormulas πβοΈ
- CleanString πβοΈ
- DisableRefreshAll πβοΈ
- EnableRefreshAll πβοΈ
- FileExists πβοΈ
- FileNameIsValid πβοΈ
- GetAllFileNames πβοΈ
- GetLetters πβοΈ
- GetMonthNumberFromName πβοΈ
- GetStringBetween πβοΈ
- GetStringWithSubstringInArray πβοΈ
- GetTableColumnNames πβοΈ
- IsAllTrue πβοΈ
- IsInArray πβοΈ
- ListObjectExists πβοΈ
- PreviousMonthNumber πβοΈ
- RangeHasAnyFormula πβοΈ
- RangeHasConstantValues πβοΈ
- RangeIsHidden πβοΈ
- RangeToHtml πβοΈ
- SendEmail πβοΈ
- SetQueryFormula πβοΈ
- StringContains πβοΈ
- StringEndsWith πβοΈ
- StringStartsWith πβοΈ
- SubstringIsInArray πβοΈ
- Summation πβοΈ
- TableHasQuery πβοΈ
- WorksheetHasListObject πβοΈ