Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
tiesNoSKIP | DENSE (default SKIP)SKIP
orderNoASC | DESC (default DESC)DESC
tableYeshome table
dimensionYesdimension column as Table[Column]
sessionIdYes
baseMeasureYesbase measure name
withinGroupNogroup column as Table[Column] for within-group ranking (optional)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full transparency burden. It discloses the internal DAX pattern (ISINSCOPE, ALLSELECTED, blank guard) and option semantics, but it does not explain whether the tool creates a new measure in the model, what the new measure is named, or what the return value is. This leaves key behavioral aspects undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact, two sentences, and front-loaded with the core purpose and pattern. Every sentence provides useful technical detail without waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool uses 7 parameters and has no output schema, so the description must explain both inputs and expected outcomes. While it covers the input options and the DAX pattern, it fails to specify the resulting measure's name, return value, or side effects, leaving the agent without critical operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 86%, so the schema already documents most parameters. The description adds minimal value beyond that, mainly restating order/ties/withinGroup semantics already present in the schema. It does not clarify the purpose of sessionId or how baseMeasure and table relate to the generated measure.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly specifies the action ('Generate a RANKX measure') and the resource/scope (with ISINSCOPE + ALLSELECTED + blank guard). It distinguishes itself from generic siblings like add_measure by naming the exact DAX pattern and options like order, ties, and withinGroup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for creating ranking measures but does not explicitly state when to use it over alternatives like add_dynamic_topn or add_running_total. No exclusions or alternative tool names are mentioned, so usage guidance is only implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyphonica/powerbi-pbix-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server