[pbi-fixer] Add add_calc_group_time_intelligence: add a Time Intelligence calc group (YTD, MTD, PY, YoY, ...) - #1215
Open
KornAlexander wants to merge 2 commits into
Conversation
…oup (YTD, MTD, PY, YoY, ...)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new semantic model “fixer” function, add_calc_group_time_intelligence(), intended to create a standard “Time Intelligence” calculation group in the semantic model behind a given Power BI report (or report scan-only), and re-exports it from sempy_labs.semantic_model.
Changes:
- Added
add_calc_group_time_intelligence()implementation to create a “Time Intelligence” calculation group (AC/Y-1..Y-3/YTD.. and variance items) using TOM operations. - Added a corresponding re-export in
src/sempy_labs/semantic_model/__init__.py.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/sempy_labs/semantic_model/_Add_CalcGroup_TimeIntelligence.py |
New fixer that scans for an existing TI calc group, finds the calendar table/date column, and creates a TI calculation group + items. |
src/sempy_labs/semantic_model/__init__.py |
Re-exports add_calc_group_time_intelligence via import and __all__ update. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… lint, init imports)
40 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a sempy_labs fixer
add_calc_group_time_intelligence()that add a Time Intelligence calc group (YTD, MTD, PY, YoY, ...).Adds one source file (
src/sempy_labs/semantic_model/_Add_CalcGroup_TimeIntelligence.py) plus one re-export line in the matching__init__.py. No other files touched, no shared helpers, no dependency on any other PR.Part of the PBI Fixer contribution. Tracking issue: #1185