refactor_to_calculation_groups
Detect similar measures (e.g., X YTD/QTD/MTD) and consolidate them into a calculation group. Optionally apply the change with auto_apply.
Instructions
Detect measures that share structure (e.g. X YTD/QTD/MTD) and
consolidate into a calculation group.
Returns the plan + (optionally) writes the calc group if auto_apply=True.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| inspector | No | ||
| auto_apply | No | ||
| measure_writer | No | ||
| min_candidates | No | ||
| preserve_originals | No | ||
| reconcile_strategy | No | strict |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||