Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 ReportingThis is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |