Forum Discussion

NoordenNL076's avatar
NoordenNL076
Regular Visitor
4 years ago

Need measure sum, not average

I need the sum of "max. capacity over period m3" for a visual. However, it is taking the average over all products, instead of summarizing the value on each row for every product.

 

Max. vol. over period m3 = AVERAGEX('Dimensions per material', 'Dimensions per material'[Volume in m3]*'Calculations'[New Max QTY])
 
can someone help?
 
Thank you!

2 Replies

  • Hi, NoordenNL076 ,
    not gonna lie, a bit confusing. Do you need a calculated column or a measure? If you need SUM why you use AVERAGEX?
    If you have column with numeric values, you can just choose your visuals put the Numeric Column into Values and display it as SUM and then put your Category as X axis or depending what visual you need.

     




  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi NoordenNL076 ,

    Are you trying to calculate the correct total value of measure?

    If so, please have a try.

    measure=var _a=[Max.vol. over period m3]
    var _b=summarize('Dimensions per material','Dimensions per material'[product],"aaa",[Max.vol. over period m3])
    return
    if(isinscope(Dimensions per material'[product]),_a,sumx(_b,[aaa]))

    If I have misunderstood your meaning, please provide more details with your desired output and some sample data.

     

    Best Regards

    Community Support Team _ Polly

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.