add_coverage_flag
Adds a calculated flag to a dimension table showing whether each member has data in a fact table, so you can filter out unused values like brands without sales.
Instructions
Close the loop on blank-on-select (the partner to audit_robustness). Adds a boolean calculated column to a dimension flagging whether each member has rows in a fact table. Filter slicers or add a report-level filter on it = users can no longer select a dead value (e.g. a brand with no sales). Returns how many members have data vs are dead. Idempotent + auto-recalcs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | the dimension table to add the flag to (e.g. Dim_Products) | |
| factTable | Yes | the fact table to test coverage against (e.g. Fact_Sales) | |
| sessionId | Yes | ||
| columnName | No | column name (default 'Has <factTable> Data') |