Forum Discussion

ponchibonosrzt's avatar
ponchibonosrzt
Frequent Visitor
3 years ago
Solved

Why does the table sum the values in one case and average them in another?

Hi. 

I have this Table

The messures are:

Consumo Total = SUM(Anexar1 [kWh])

Consumo HHogar Unificado =   ([Consumo Total]/ COUNTROWS(Anexar1))/0.4013888

 

Why in Total does sum the values for "Total consumption" and average for "Consumo hogar unificado"?  I would like to be added in both cases.

 

The other question is: how to make a measurement that sums the "Consumo hogar unificado" data for each "Subestación".

I would like to have a card with this measurement.

 

Thanks in advance.

 

 

  • I use this formula:  

    SUMX ( VALUES ( Table1[ColABC] ), [AvgMeasure] )

     

    Works fine!

4 Replies

  •  

    I see that you are trying to do is Sum of Averages. You can do as below:

     

     

    AVG_SITE = SUMX(
        SUMMARIZE('Table', 'Table'[name], "L1Value", AVERAGE('Table'[ValueColumn])),
        [L1Value])

     

     

     

    Change your average column measure and see if it works; 

    Replace with your names, as I dont know your language, providing here so that you can change it

     

     

    Consumo HHogar Unificado = SUMX(
        SUMMARIZE('YourTableName'
                , 'YourTableName'[Subestación]
                , "L1Value", ([Consumo Total]/ COUNTROWS(Anexar1))/0.4013888),
        [L1Value]) 

     

     

     

    Hope this helps!

  • I use this formula:  

    SUMX ( VALUES ( Table1[ColABC] ), [AvgMeasure] )

     

    Works fine!