Forum Discussion

puj831's avatar
puj831
Frequent Visitor
8 years ago
Solved

Calculating Averages with conditions

How can I take the average of Price with the condition that Volume > 0?
  • Claster's avatar
    Claster
    8 years ago

    Maby Its depends of your Culture, try to use [  ,  ] instead of  [  ;  ] and try to count your 

  • popov's avatar
    popov
    8 years ago

    Try this
    AveragePrice := AVERAGEX (FILTER(YourTableName, YourTableName[Volume] > 0), YourTableName[Price])

    or this

     

     AveragePrice := CALCULATE ( AVERAGE (YourTableName[Price] ), YourTableName[Volume] > 0 )