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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Group by based on DAX column

I have 2 tables in the model. In the firsttable I bring a column from the second table using DAX function RELATED.

Talble 1:

Order IDProduct ID
16281
92002
86153
38744
10571
72502
12433
46684

 

Table 2:

Product IDPrice
1100
250
3150
4230

 

And the first table after bringing another column:

Order IDProduct ID

Price

16281100
1628250
86153150
38744230
10571100
7250250
38743150
46684230

 

Now I need a new table that will show me Order ID and the total amount:

Order IDTotal Amount
1057100
1628150
3874380
4668230
725050
8615150

 

I tried to do it in a few ways and non recognizes the new price column. 

I tried to add a table in the following way:

Total Price per order = SUMMARIZECOLUMNS(Orders[Order ID], "Total Order Price", Orders[Price])
 
I get the following error: 
A single value for column rpice in table Prders cannot be determined..
 
What am I doing wrong?

(couldn't find a way to attach the file..)

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try: Total Price per order = SUMMARIZECOLUMNS(Orders[Order ID]"Total Order Price", SUM(Orders[Price]))



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@Anonymous Try: Total Price per order = SUMMARIZECOLUMNS(Orders[Order ID]"Total Order Price", SUM(Orders[Price]))



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.