Forum Discussion

smishra99acres's avatar
1 year ago
Solved

Error message in DAX while using Summarize

 

  • Hi smishra99acres 

     

    The Summarize function creates a table.

    You cannot use it by itself in a measure.

     

    Use New Table to create a table using the summarize function:

     

    If you want to use it in a measure, you need to do something with the table.

    AggregateX functions like MaxX, AverageX and SumX let you aggregate the rows of data.

     

    Here for example I am using Summarize to calculate for each Quantity what the Sum of Price is.

    Then using AggergateX to return the overall average.

     

1 Reply

  • Hi smishra99acres 

     

    The Summarize function creates a table.

    You cannot use it by itself in a measure.

     

    Use New Table to create a table using the summarize function:

     

    If you want to use it in a measure, you need to do something with the table.

    AggregateX functions like MaxX, AverageX and SumX let you aggregate the rows of data.

     

    Here for example I am using Summarize to calculate for each Quantity what the Sum of Price is.

    Then using AggergateX to return the overall average.