Forum Discussion

RookiePBI2019's avatar
RookiePBI2019
Regular Visitor
7 years ago
Solved

Sum average by Date

Hi all,

 

I would need some help with a specific DAX formula that it is getting me crazy.

I need the sum of average by date and WH of the following table:

 

DateWHTotal Lines
13/05/2019ALBACETE223
13/05/2019ALBACETE223
13/05/2019ALBACETE223
13/05/2019ALBACETE223
13/05/2019ALBACETE223
20/05/2019ALBACETE150
20/05/2019ALBACETE150
20/05/2019ALBACETE150
20/05/2019ALBACETE150
13/05/2019ALICANTE456
13/05/2019ALICANTE456
13/05/2019ALICANTE456
13/05/2019ALICANTE456
13/05/2019ALICANTE456
20/05/2019ALICANTE56
20/05/2019ALICANTE56
20/05/2019ALICANTE56
20/05/2019ALICANTE56

 

The result that I am expected is sum both days average by WH:

 

ALBACETE373
ALICANTE512

 

I hope somebody can help me.

Thanks in advance!

  • RookiePBI2019 here is the measure for you

     

    Sum of Avg by Date and WH = 
    SUMX( 
    SUMMARIZE( Table1, Table1[Date], Table1[WH] ),
     CALCULATE( AVERAGE( Table1[Total Lines] ) ) 
    )

2 Replies

  • RookiePBI2019 here is the measure for you

     

    Sum of Avg by Date and WH = 
    SUMX( 
    SUMMARIZE( Table1, Table1[Date], Table1[WH] ),
     CALCULATE( AVERAGE( Table1[Total Lines] ) ) 
    )