Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Why I cannot do this?
EVALUATE
VAR myvirtuatable = ADDCOLUMNS(
SUMMARIZE(
FILTER('table_a',[field]=666),
'table_a'[field2],
'table_a'[field3]
),
"total", CALCULATE(sum('table_a'[value]))
)
RETURN ADDCOLUMNS(myvirtuatable,"RANK",RANKX(myvirtuatable,total,,DESC))
"cannot find this name, "total"
Solved! Go to Solution.
You can, your syntax is off just a bit though @felipefrutuoso
When you create a table using a variable, if the function can see the table (iterators can, aggregators cannot), the field name has to be wrapped in square brackets.
EVALUATE
VAR myvirtuatable =
ADDCOLUMNS(
SUMMARIZE(
FILTER(
'table_a',
[field] = 666
),
'table_a'[field2],
'table_a'[field3]
),
"total",
CALCULATE(
SUM( 'table_a'[value] )
)
)
VAR Result =
ADDCOLUMNS(
myvirtuatable,
"RANK",
RANKX(
myvirtuatable,
[total], <---- Adjustment to syntax
,
DESC
)
)
RETURN
Result
See if that works for you.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingYou can, your syntax is off just a bit though @felipefrutuoso
When you create a table using a variable, if the function can see the table (iterators can, aggregators cannot), the field name has to be wrapped in square brackets.
EVALUATE
VAR myvirtuatable =
ADDCOLUMNS(
SUMMARIZE(
FILTER(
'table_a',
[field] = 666
),
'table_a'[field2],
'table_a'[field3]
),
"total",
CALCULATE(
SUM( 'table_a'[value] )
)
)
VAR Result =
ADDCOLUMNS(
myvirtuatable,
"RANK",
RANKX(
myvirtuatable,
[total], <---- Adjustment to syntax
,
DESC
)
)
RETURN
Result
See if that works for you.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThe Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 8 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 24 | |
| 17 | |
| 11 | |
| 10 |