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
Dear all,
I'm doing a lab with Power BI, using DAX studio connect to my dataset in power BI. I could get the result when write the dax code in dax studio, but It got failure when I try this measure with Power BI, could someone assist me ?
below is the code in DAX studio and it could get the correct result
EVALUATE
var temp =
SUMMARIZE(all_data1,all_data1[Illness],"SUM",SUMX(all_data1,all_data1[Paid amount]))
return
TOPN(10,temp,[SUM],DESC)Here is the measure which I tried with Power BI , it said "The expression refers to multiple columns. Multiple columns can not be convert to a scalar value"
top10 =
var temp =
SUMMARIZE(all_data1,all_data1[Illness],"SUM",SUMX(all_data1,all_data1[Paid amount]))
return
TOPN(10,temp,[SUM])
Solved! Go to Solution.
hi @Anonymous
DAX studio returns a table, while a measure returns a scalar/single value. That is the issue. So in a measure definition, the outmost or last function is typically count/sum(x)/min/max.
hi @Anonymous
DAX studio returns a table, while a measure returns a scalar/single value. That is the issue. So in a measure definition, the outmost or last function is typically count/sum(x)/min/max.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 14 | |
| 7 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 29 | |
| 18 | |
| 17 | |
| 11 | |
| 10 |