Forum Discussion
Thulasiraman
3 years agoHelper II
Summarize error
Hi
I have created a SUMMARIZE Dax which shows the error which I could not understand.
Pls help
Thulasiraman
14 Replies
- FreemanZSuper User
Hi Thulasiraman
are you creating a measure?
- ThulasiramanHelper II
- FreemanZSuper User
hi Thulasiraman
SUMMARIZE returns a table, and, in most cases, a table can't be used as a scalar value directly. So comes the warning.
You need either make some calculation based on that table or use the code to create a new table.
- MahyarTFMemorable Member
Hi,
As I know the Summarized measure is a return table and not sure if you use it as a direct measure to calc the sum of column
- ThulasiramanHelper II
- MahyarTFMemorable Member
Hi
This is Dax code for creating the table using Summarize :
Sheet87Summarize = SUMMARIZE(sheet87, Sheet87[Customer], "sale", sum(Sheet87[Weight]))This is TOp N with Summarize :Sheet87TopSum = topn(2, SUMMARIZE(sheet87, Sheet87[Customer], "Sales", sum(Sheet87[Weight])))Appreciate your Kudos and please mark it as a solution if it helps you