Forum Discussion

Thulasiraman's avatar
Thulasiraman
Helper II
3 years ago

Summarize error

Hi

 

I have created a SUMMARIZE Dax which shows the error which I could not understand.

 

Pls help

Thulasiraman

14 Replies

      • FreemanZ's avatar
        FreemanZ
        Super 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.

      • MahyarTF's avatar
        MahyarTF
        Memorable 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