Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Result from DAX studio different from Power BI

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])

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

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.

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

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.

Anonymous
Not applicable

Hi @FreemanZ ,

Thank you for suggests , It could work as well. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.