Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Samarth-Borade
Frequent Visitor

How do I summarize a measure into a column?

new_sales =
 CALCULATE([pp],ALLEXCEPT(grp,grp[_Customer Code]))
------------------
pp =
VAR TblSummary = ADDCOLUMNS(
                    SUMMARIZE(grp,grp[_Customer Code],grp[_EDC Tradelane],grp[_STC Tradelane]),
                    "SummaryCol",CALCULATE(SUM(grp[Rev])))
RETURN
    SUMX(TblSummary,[SummaryCol])
 -----------------------
IMP: pp is measure and i want new_sales as a NEW COLUMN which is same as pp.

Here pp and new_sales should be same.

using allexcept to summarize is giving wrong values.

3 REPLIES 3
Anonymous
Not applicable

Hi @Samarth-Borade ,

 

Do you want to calcualte the sum baed on group of three columns: grp[_Customer Code]/grp[_EDC Tradelane]/grp[_STC Tradelane]? Here I suggest you to try code as below to achieve your goal.

new_sales = 
CALCULATE(SUM(grp[Rev]),ALLEXCEPT(grp,grp[_Customer Code],grp[_EDC Tradelane],grp[_STC Tradelane]))

 

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.

 

FreemanZ
Super User
Super User

hi @Samarth-Borade 

what columns do you have in your grp table?

 

Table name : grp

Column: cust_name, cust_code, edc_lane, stc_lane,revenue

Slicers: cust_code,edc_lane,stc_lane

when i select cust_code in slicer : it is not summarzing up instead it is giving values for each.

code: 

new_sales = CALCULATE(SUM(grp[Rev]),ALLEXCEPT(grp,grp[_Customer Code],grp[_custname],grp[_EDC Tradelane],grp[_STC Tradelane])) 
Not working!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.