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
Thulasiraman
3 years agoHelper II
MahyarTF
3 years agoMemorable 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
- Thulasiraman3 years agoHelper II
- Thulasiraman3 years agoHelper II
Hi MahyarTF
Created the above TOPN dax.
Tested the Summarize portion and it creates a valid table.
But when nested in TOPN it shows the error.
Appreciate very much if you could be able to find the error I am committing.
- FreemanZ3 years agoSuper User
Same issue: TOPN returns a list/table. When creating a measure, the outmost function shall be someone returning a value (or a one-row-one-column table), like SUM, MIN/MAX/AVERAGE, COUNTROWS, MINX/MAXX, etc.
try like:
measure = CALCULATE( SUM[tbl[Value]], TOPN(...))
What is your ultimate goal of this measure?