Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Dear all,
I'm a newbie in DAX, in my lab I try to use SUMX function to sum all premium fee group by industry.
My DAX function is below:
EVALUATE
var temp =
FILTER(
SUMMARIZE(
Premium_table,
Premium_table[Industry],
Premium_table[SUM PREMIUM]
),
[SUM PREMIUM] > 10000)
RETURN
ADDCOLUMNS(
temp,
"sum_groupby_Industry" , SUMX(temp, temp[SUM PREMIUM])
)
Tried with DAX studio, it failed with log "Query (15, 40) Cannot find table 'temp' , I think I have defined temp table in above already , could you please assist on my issue ?
Solved! Go to Solution.
Hi,
Thank you for your message.
In my opinion, the below part was the cause, so I changed to the original table name.
temp is a virtual table that is created inside the formula, but when creating it, it used the original column name ( Premium_table[SUM PREMIUM] ) in SUMMARIZE function.
Hi,
I am not sure if I understood your question correctly, but please try the below whether it provides the desired result.
new addco table =
VAR temp =
FILTER (
SUMMARIZE ( Premium_table, Premium_table[Industry], Premium_table[SUM PREMIUM] ),
[SUM PREMIUM] > 10000
)
RETURN
ADDCOLUMNS (
temp,
"sum_groupby_Industry", SUMX ( temp, Premium_table[SUM PREMIUM] )
)
hi @Jihwan_Kim ,
It work, however I'm curious why my code didn't work ? temp table was defined already but dax still said "Cannot find table 'temp'"
Hi,
Thank you for your message.
In my opinion, the below part was the cause, so I changed to the original table name.
temp is a virtual table that is created inside the formula, but when creating it, it used the original column name ( Premium_table[SUM PREMIUM] ) in SUMMARIZE function.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |