Skip to main content
Glama

count_where

Generate a complete SSRS conditional-count expression using =Sum(IIf(condition, 1, 0)) for Power BI paginated reports. Accepts an RDL expression body without leading equals sign.

Instructions

Emit =Sum(IIf(, 1, 0)) — the SSRS conditional-count idiom. condition is an RDL expression body (no leading '='). Returns a complete top-level expression suitable for set_textbox_value or any RDL sink.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionYesRDL expression body, e.g. 'Fields!Status.Value = "Active"'.
Behavior3/5

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

No annotations provided; description discloses that the tool emits an expression (pure function) and defines condition format. Lacks details on side effects or safety, but the nature of expression building is inherently non-destructive.

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?

Two sentences that are front-loaded with the core expression, no extraneous information. Every sentence serves a purpose.

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

Completeness5/5

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

Given a single parameter, no output schema, and low complexity, the description covers the tool's behavior, input format, and output usage comprehensively. No gaps identified.

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

Parameters4/5

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

Schema covers 100% of parameter, but description adds critical constraint: condition must be an RDL expression body without leading '='. This adds value beyond the schema's example.

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?

Clearly states it emits a conditional-count idiom using Sum(IIf(...)), and identifies its use case for set_textbox_value or RDL Value sinks. Differentiates from sibling sum_where by specifying it counts (using 1 and 0).

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

Usage Guidelines4/5

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

Explicitly describes the output's suitability for set_textbox_value or RDL Value sinks, implying when to use. Does not include explicit when-not-to-use or alternatives, but context with sibling sum_where provides implicit guidance.

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/mafaq229/pbirb-mcp'

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