Forum Discussion

Spartanos's avatar
Spartanos
Helper II
4 years ago
Solved

AVERAGEX with RELATED function

Hi, I want to calculate the average price per month, with a lookup (related function) in DAX, and with additional constraints. I created both a calulated (weight_factor) column as well as a meassur...
  • tamerj1's avatar
    4 years ago

    Hi Spartanos 
    Creae a relationship between the two tables then create MEASURE >

    Average Price = 
    CALCULATE ( 
        AVERAGE ( Table1[Overll Charge] ), 
        Table1[Overll Charge] > 0, 
        Table1[Weightt_factor] = 1,
        Table1[TEX] = 2
    )

     

    Here is a sample file  https://www.dropbox.com/t/nVDrfEioumlKqKZb