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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Using SUMMARIZECOLUMNS or SUMMARIZE as a Measure

Hey All

 

I have a table with all order lines. This means I have multiple rows per order. Each row is an Articleposition. I would like to sum up all articles per order.

 

Mey expected Result:

 

orderIDPriceTotalOrderPrice
11060
12060
13060
21050
21050
21050
21050
21050

 

I have managed to get to that result by using below dax formula:

 

 
TotalOrder = SUMMARIZECOLUMNS('Lian CH$Sales Invoice Line'[OrderNo],"Total", sum('Lian CH$Sales Invoice Line'[AmoutNoVat]))

However, this is only working when creating a new table. This does not work for a measure.

Is there any way to use it as a measure.

 

Thank you in Advance

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a measure like

TotalOrderPrice = sumx(filter(allselected('Lian CH$Sales Invoice Line'), 'Lian CH$Sales Invoice Line'[OrderNo] = max('Lian CH$Sales Invoice Line'[OrderNo] )),'Lian CH$Sales Invoice Line'[AmoutNoVat])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

I don't think you need either for this.

 

Try this:

TotalOrderPrice =
CALCULATE (
    SUM ( Sales[Price] ),
    ALLEXCEPT ( Sales, Sales[orderID] ),
    ALLSELECTED ()
)
amitchandak
Super User
Super User

@Anonymous , Try a measure like

TotalOrderPrice = sumx(filter(allselected('Lian CH$Sales Invoice Line'), 'Lian CH$Sales Invoice Line'[OrderNo] = max('Lian CH$Sales Invoice Line'[OrderNo] )),'Lian CH$Sales Invoice Line'[AmoutNoVat])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.