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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
soumit
New Member

dax not working on report view

Dear experts i need help, i dont understand why i cant use topn,filter,summarize function in dax , here is an example 

CALCULATETABLE(TOPN(10,Car_sales,Car_sales[Horsepower],DESC)),its a very simple formula aims to give top values based on horsepower column of the Car_sales table the problem that im facing is its working in the Dax query view but not in the report view , its showing me this message " The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value. " why itsonlyScreenshot 2024-06-03 020911.pngScreenshot 2024-06-03 020945.png working on the query view 
another example Top10Cars =
TOPN (10,SUMMARIZE ('Car_sales','Car_sales'[Manufacturer], 'Car_sales'[Model],"TotalSales", SUM ( 'Car_sales'[Sales_in_thousands] )),[TotalSales], DESC) this one aims to get the top 10 car manufatures and the model based on the sales again i can see the result in the query view but its showing this " The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value. "
1 ACCEPTED SOLUTION
sjoerdvn
Super User
Super User

Your DAX query returns a table, so you cannot use it as a measure, since a measure should return a scalar value.
You could use it as a (calculated) table, but note that the query would be exdcuted when (loading) processing the model; so it will not take into account any slicers or filters.

 

Instead, you could also add a TOP N filter to a visual

sjoerdvn_0-1717431937440.png

 

View solution in original post

1 REPLY 1
sjoerdvn
Super User
Super User

Your DAX query returns a table, so you cannot use it as a measure, since a measure should return a scalar value.
You could use it as a (calculated) table, but note that the query would be exdcuted when (loading) processing the model; so it will not take into account any slicers or filters.

 

Instead, you could also add a TOP N filter to a visual

sjoerdvn_0-1717431937440.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.