Forum Discussion
rtech2022
4 years agoRegular Visitor
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. ...
- Anonymous4 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.
Anonymous
4 years agoNot applicable
Hi rtech2022 ,
If you want to get the sum of [prod_target] for each shift, your final output should be
for D——4365.16+4583.42=8948.59 , for N ——4583.42. Actually I'm confused why N is 9166.84.
My method:
Measure =
var _t= SUMMARIZE(FILTER(ALLSELECTED('tbl_Mining'),[Shift]=MAX('tbl_Mining'[Shift])),"sum of each shift",SUM('tbl_Target'[Production Target]))
return SUMX(_t,[sum of each 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.