add_rank_measure
Generate a DAX RANKX measure to rank a base measure by a dimension, with ISINSCOPE, ALLSELECTED, and blank guard, plus options for order, ties, and within-group ranking.
Instructions
Generate a RANKX measure with ISINSCOPE + ALLSELECTED + blank guard. order = ASC | DESC (default DESC); ties = SKIP | DENSE (default SKIP). withinGroup (Table[Column]) ranks inside each group.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ties | No | SKIP | DENSE (default SKIP) | SKIP |
| order | No | ASC | DESC (default DESC) | DESC |
| table | Yes | home table | |
| dimension | Yes | dimension column as Table[Column] | |
| sessionId | Yes | ||
| baseMeasure | Yes | base measure name | |
| withinGroup | No | group column as Table[Column] for within-group ranking (optional) |