Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ponchibonosrzt
Frequent Visitor

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

Hi. 

I have this Table

ponchibonosrzt_0-1698707435575.png

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.

 

 

1 ACCEPTED SOLUTION
ponchibonosrzt
Frequent Visitor

I use this formula:  

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

 

Works fine!

View solution in original post

4 REPLIES 4
ponchibonosrzt
Frequent Visitor

I use this formula:  

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

 

Works fine!

Glad it worked!

 

 

sevenhills
Super User
Super User

 

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!

Thanks for the answer, let me check. 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.