Forum Discussion

rtech2022's avatar
rtech2022
Regular Visitor
4 years ago
Solved

Aggregate grouping rollup sum

Hi there, looking for suggestions to get a aggregated sum based on a defined grouping. In this example, i would like to see the grouping by ProdDate + Shift I tried using the summarize function. ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi rtech2022 ,

     

    Please try:

    Weighted BCM Var% = (SUM('tbl_Mining'[BCM])-[Weighted Shift Target] ) /[Weighted Shift Target]
    AVG Weighted BCM Var% = 
    var _t=  SUMMARIZE(ALLSELECTED('tbl_Mining'),[Shift],[FromLocation],"%",[Weighted BCM Var%])
    return AVERAGEX(FILTER(_t,[Shift]=MAX('tbl_Mining'[Shift])),[%])
    AVG Weighted BCM Var% = 
    var _t=  SUMMARIZE(ALLSELECTED('tbl_Mining'),[Shift],[FromLocation],"%",[Weighted BCM Var%])
    return AVERAGEX(FILTER(_t,[Shift]=MAX('tbl_Mining'[Shift])),[%])

     

     

     

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