Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Summarize function error: the expression refers to multiple columns

Hi experts,

When using the expression below I am getting the error: 

Summarize function error: the expression refers to multiple columns

Any idea what I am missing?

 

MyMeasure:=SUMMARIZE( Range,Range[Date], "Total Value", sum( Range[Sales]))

 

DateCustomerCityCountrySales
20/01/2025ASydneyAustralia15
27/01/2025ANew YorkUS20
3/02/2025AMelbourneAustralia10
10/02/2025ASao PauloBrazil16
17/02/2025ALondonUK13
24/02/2025ARomeItaly13
3/03/2025AParisFrance11
20/01/2025BSydneyAustralia17
27/01/2025BNew YorkUS14
3/02/2025BMelbourneAustralia15
10/02/2025BSao PauloBrazil20
17/02/2025BLondonUK11
24/02/2025BRomeItaly15
3/03/2025BParisFrance15
20/01/2025CSydneyAustralia12
27/01/2025CNew YorkUS15
3/02/2025CMelbourneAustralia17
10/02/2025CSao PauloBrazil10
17/02/2025CLondonUK12
24/02/2025CRomeItaly19
3/03/2025CParisFrance17
20/01/2025DSydneyAustralia13
27/01/2025DNew YorkUS11
3/02/2025DMelbourneAustralia12
10/02/2025DSao PauloBrazil14
17/02/2025DLondonUK15
24/02/2025DRomeItaly14
3/03/2025DParisFrance16

 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous ,

    Irwan has explained very clearly why this error is reported and given a solution. If you want to get the summarized values group by the data, you can also create a table visual in Power BI directly with below setttings to get it:

    Hi Canguru ,

    You can refer the following link to insert a pivot table to get it just as shown in below screenshot:

    Power Pivot Principles: Introducing the SUMMARIZE Function

    Best Regards

4 Replies

  • Irwan's avatar
    Irwan
    Super User

    hello Anonymous 

     

    your DAX works perfectly if your expected result is a table.

     

    however, looks like you put the DAX into measure which has scalar return value (not a column) the you got this error.

    here is return value of SUMMARIZE() based on SUMMARIZE function (DAX) - DAX | Microsoft Learn

     

    you can use SUMMARIZE() in measure, but i believe you need to do SUMMARIZE() in virtual table then take the value from virtual table as your measure result.

     

    Hope this will help.

    Thank you.

    • Canguru's avatar
      Canguru
      Regular Visitor

      Thanks Irwan ,

      How did you return a virtual table using the summarize expression? I have created the measure using PowerPivot. How can I create the virtual table in PowerPivot?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous ,

        Irwan has explained very clearly why this error is reported and given a solution. If you want to get the summarized values group by the data, you can also create a table visual in Power BI directly with below setttings to get it:

        Hi Canguru ,

        You can refer the following link to insert a pivot table to get it just as shown in below screenshot:

        Power Pivot Principles: Introducing the SUMMARIZE Function

        Best Regards