Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
79ab7fe
dax testing
m-kovalsky May 26, 2026
d91eb43
enhancements
m-kovalsky May 28, 2026
4d4e07c
model view
m-kovalsky May 28, 2026
27ff733
chart
m-kovalsky May 28, 2026
f8edf9b
add dax parser
m-kovalsky May 28, 2026
c1382f1
color coding dax
m-kovalsky May 29, 2026
16764e8
calc groups
m-kovalsky May 31, 2026
297ecbc
desc
m-kovalsky May 31, 2026
1a3e55d
roles
m-kovalsky May 31, 2026
54c27f0
generate, model picker
m-kovalsky May 31, 2026
e3affca
fix
m-kovalsky May 31, 2026
283ad8a
model picker
m-kovalsky May 31, 2026
fba0f66
query builder
m-kovalsky May 31, 2026
2561f0f
dax parser IN statement, IN, NOT IN for query builder
m-kovalsky May 31, 2026
afc8bda
no same objects in query builder pane
m-kovalsky May 31, 2026
5bd670e
helper text
m-kovalsky May 31, 2026
9847c53
colors
m-kovalsky May 31, 2026
c643497
change
m-kovalsky Jun 1, 2026
44684f4
ui components
m-kovalsky Jun 1, 2026
1656015
define measures; fix loading issue
m-kovalsky Jun 1, 2026
8367e92
dax formatter button
m-kovalsky Jun 1, 2026
72d25d4
undo, redo buttons
m-kovalsky Jun 1, 2026
4d46d78
size
m-kovalsky Jun 1, 2026
d3855ee
optimize
m-kovalsky Jun 2, 2026
763110b
1 trace
m-kovalsky Jun 2, 2026
80dc788
query history
m-kovalsky Jun 2, 2026
706f94c
query history, download button
m-kovalsky Jun 2, 2026
f251568
charts
m-kovalsky Jun 2, 2026
7fae6e2
first query
m-kovalsky Jun 2, 2026
0ad3da7
remove generate button
m-kovalsky Jun 2, 2026
b8c985c
cut, copy, paste, impersonation output
m-kovalsky Jun 2, 2026
a502f96
fix loading new model
m-kovalsky Jun 2, 2026
1688860
dax query plan
m-kovalsky Jun 4, 2026
fe1f2c7
dark mode parameter
m-kovalsky Jun 4, 2026
55fca85
dax query plan
m-kovalsky Jun 4, 2026
32ec8d5
query plan working
m-kovalsky Jun 4, 2026
84b85f0
query dep columns
m-kovalsky Jun 7, 2026
d88f404
fix dax query plan
m-kovalsky Jun 7, 2026
1fb8453
vertipaq analyzer
m-kovalsky Jun 7, 2026
2905c82
hide warning
m-kovalsky Jun 7, 2026
15df73a
analysis button
m-kovalsky Jun 7, 2026
2a38421
dax parse comments
m-kovalsky Jun 7, 2026
44a1ad9
nl 2 dax
m-kovalsky Jun 7, 2026
23227cc
dax comments color coded
m-kovalsky Jun 7, 2026
e69d1e3
pop out dax
m-kovalsky Jun 7, 2026
ddf0100
popout color icon
m-kovalsky Jun 7, 2026
ca93f64
consistent button size
m-kovalsky Jun 7, 2026
24a72e9
query plan one block
m-kovalsky Jun 7, 2026
0b3660d
properly filter trace results using RequestID
m-kovalsky Jun 7, 2026
b063084
black
m-kovalsky Jun 9, 2026
08a3f98
sizing
m-kovalsky Jun 9, 2026
ad074d4
added execution metrics
m-kovalsky Jun 9, 2026
d9ca7a1
preload models
m-kovalsky Jun 9, 2026
af61964
filter rule
m-kovalsky Jun 9, 2026
3f3d535
full screen baby
m-kovalsky Jun 9, 2026
0583818
download query result
m-kovalsky Jun 9, 2026
53fd0bf
capture report queries
m-kovalsky Jun 9, 2026
82faa10
return trace
m-kovalsky Jun 9, 2026
0bb27f8
application context
m-kovalsky Jun 10, 2026
86b8255
full screen mode for all apps
m-kovalsky Jun 10, 2026
f4bed18
delta analyzer picker
m-kovalsky Jun 10, 2026
4566efe
fix delta
m-kovalsky Jun 14, 2026
7d6385a
hammer
m-kovalsky Aug 4, 2026
9d31a6c
UI fixes
m-kovalsky Aug 4, 2026
308147f
ui upgrades
m-kovalsky Aug 4, 2026
a56c706
faster
m-kovalsky Aug 4, 2026
000e736
ui
m-kovalsky Aug 4, 2026
a967c13
cycle reports
m-kovalsky Aug 4, 2026
84adc28
move trace history, capture report queries
m-kovalsky Aug 5, 2026
b55cd23
callbackdataid
m-kovalsky Aug 5, 2026
ccc6dc2
clean
m-kovalsky Aug 5, 2026
441ef2d
workspace monitoring
m-kovalsky Aug 5, 2026
3b1912c
fix workspace monitoring, dax formatting
m-kovalsky Aug 5, 2026
1d75c8f
define measure, workspace monitoring output cleanup
m-kovalsky Aug 5, 2026
dcb6281
ui upgrades
m-kovalsky Aug 5, 2026
925a607
model view upgrades
m-kovalsky Aug 5, 2026
067add6
model view child object indentation
m-kovalsky Aug 5, 2026
329e661
dependencies
m-kovalsky Aug 5, 2026
2084c70
color dependencies
m-kovalsky Aug 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/sempy_labs/_daxformatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ def _format_dax(
expressions = [expressions]
metadata = [metadata] if metadata else [{}]

# Add variable assignment to each expression
expressions = [f"x :={item}" for item in expressions]
# Add variable assignment to each expression (skip for EVALUATE queries,
# which are already valid standalone DAX statements).
expressions = [
item if item.lstrip().lower().startswith("evaluate") else f"x :={item}"
for item in expressions
]

url = "https://daxformatter.azurewebsites.net/api/daxformatter/daxtextformatmulti"

Expand Down
67 changes: 30 additions & 37 deletions src/sempy_labs/semantic_model/_direct_lake_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3427,9 +3427,7 @@ def _list_source_tables_payload(
if source_type == "Lakehouse":
from sempy_labs.lakehouse import get_lakehouse_tables

dfT = get_lakehouse_tables(
lakehouse=source_id, workspace=workspace_id
)
dfT = get_lakehouse_tables(lakehouse=source_id, workspace=workspace_id)
items = []
for _, r in dfT.iterrows():
schema = str(r.get("Schema Name") or "")
Expand All @@ -3454,9 +3452,7 @@ def _list_source_tables_payload(
if not table:
continue
items.append({"schema": schema, "table": table})
items.sort(
key=lambda x: ((x["schema"] or "").lower(), x["table"].lower())
)
items.sort(key=lambda x: ((x["schema"] or "").lower(), x["table"].lower()))
return {"items": items}
except Exception as e:
return {"error": str(e)}
Expand Down Expand Up @@ -3691,7 +3687,12 @@ def _on_run(_change):
continue
key = f"{ws_id}::{src_type}::{src_id}::{schema}::{table}"
new_map[key] = _list_source_columns_payload(
ws_id, src_type, src_id, schema, table, use_sql,
ws_id,
src_type,
src_id,
schema,
table,
use_sql,
)
# Single assignment triggers one sync to the frontend, which
# then refreshes every visible column picker.
Expand Down Expand Up @@ -3807,12 +3808,14 @@ def _on_run(_change):
if c.Type == TOM.ColumnType.RowNumber:
continue
src_col = getattr(c, "SourceColumn", "") or ""
if src_col and src_col not in wanted and c.Name not in wanted:
if (
src_col
and src_col not in wanted
and c.Name not in wanted
):
t.Columns.Remove(c.Name)
if refresh_after:
refresh_semantic_model(
dataset=ds_id_resolved, workspace=ws_id
)
refresh_semantic_model(dataset=ds_id_resolved, workspace=ws_id)
widget.workspace_id = str(ws_id)
widget.workspace_name = _resolve_ws_name(ws_id)
widget.dataset_id = str(ds_id_resolved)
Expand Down Expand Up @@ -3849,6 +3852,7 @@ def _on_run(_change):
changes = data.get("changes") or []
if not changes:
return

# Defer table renames to the end so other staged changes
# that reference the original table name resolve correctly.
# Run add_source first so subsequent reassign_table /
Expand All @@ -3862,6 +3866,7 @@ def _change_order(ch):
if k == "rename_table":
return 3
return 2

changes = sorted(changes, key=_change_order)
summary = []
with connect_semantic_model(
Expand Down Expand Up @@ -3981,7 +3986,9 @@ def _change_order(ch):
# can override the entity name.
if isinstance(spec, dict):
raw_spec = (spec.get("spec") or "").strip()
custom_name = (spec.get("name") or "").strip() or None
custom_name = (
spec.get("name") or ""
).strip() or None
else:
raw_spec = str(spec).strip()
custom_name = None
Expand Down Expand Up @@ -4038,9 +4045,7 @@ def _change_order(ch):
table_name = p.get("table_name")
cols = p.get("columns") or []
if not table_name:
raise ValueError(
"Table is required to edit columns."
)
raise ValueError("Table is required to edit columns.")
if not cols:
continue
renames = []
Expand Down Expand Up @@ -4080,8 +4085,7 @@ def _change_order(ch):
f"'{table_name}': {exc}"
)
summary.append(
f"updated {len(cols)} column(s) in "
f"'{table_name}'"
f"updated {len(cols)} column(s) in " f"'{table_name}'"
)
elif kind == "rename_table":
old_name = change.get("key") or p.get("table_name")
Expand All @@ -4093,12 +4097,9 @@ def _change_order(ch):
)
if old_name == new_name:
continue
if old_name not in [
t.Name for t in tom.model.Tables
]:
if old_name not in [t.Name for t in tom.model.Tables]:
raise ValueError(
f"Table '{old_name}' not found "
"in the model."
f"Table '{old_name}' not found " "in the model."
)
try:
tom.model.Tables[old_name].Name = new_name
Expand All @@ -4119,15 +4120,10 @@ def _change_order(ch):
add_cols = p.get("add") or []
remove_cols = p.get("remove") or []
if not table_name:
raise ValueError("Table is required to sync columns.")
if table_name not in [t.Name for t in tom.model.Tables]:
raise ValueError(
"Table is required to sync columns."
)
if table_name not in [
t.Name for t in tom.model.Tables
]:
raise ValueError(
f"Table '{table_name}' not found "
"in the model."
f"Table '{table_name}' not found " "in the model."
)
added = 0
removed = 0
Expand All @@ -4142,10 +4138,7 @@ def _change_order(ch):
if dtype == "Binary":
continue
existing = {
c.Name
for c in tom.model.Tables[
table_name
].Columns
c.Name for c in tom.model.Tables[table_name].Columns
}
target_name = col_name
suffix = 1
Expand All @@ -4161,9 +4154,9 @@ def _change_order(ch):
added += 1
for col_name in remove_cols:
try:
tom.model.Tables[
table_name
].Columns.Remove(col_name)
tom.model.Tables[table_name].Columns.Remove(
col_name
)
removed += 1
except Exception:
continue
Expand Down
Loading
Loading