Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi.
I have a table where I have 3 columns:
-A;
-B;
-C = A/B
And when I aggregate I need to sum the result of each row of column C instead the sum of column A divided by the sum of column B.
Is it possible to do this?
Solved! Go to Solution.
Hi @Anonymous ,
Make sure [C] is a calculated column with logic [A] / [B] in Power BI. Then you can aggregate it in visual like table by sum function in value field. If [C] is a measure, you need to sum the measure or create avirtual table to calculate [C] to get the result you want.
Calculated column:
C = DIVIDE( 'Table'[A],'Table'[B])
Result is as below.
Measure:
C =
VAR _ADD = ADDCOLUMNS('Table',"C",DIVIDE([A],[B]))
RETURN
SUMX(_ADD,[C])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Make sure [C] is a calculated column with logic [A] / [B] in Power BI. Then you can aggregate it in visual like table by sum function in value field. If [C] is a measure, you need to sum the measure or create avirtual table to calculate [C] to get the result you want.
Calculated column:
C = DIVIDE( 'Table'[A],'Table'[B])
Result is as below.
Measure:
C =
VAR _ADD = ADDCOLUMNS('Table',"C",DIVIDE([A],[B]))
RETURN
SUMX(_ADD,[C])
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
8 | |
4 | |
3 | |
3 | |
3 |