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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Christian87
Regular Visitor

Group and Divide sum of column on sum of another column

Hi everyone, 

 

I have a simple but extensive database :

Order #Revenue GroupRevenue# items sold
10001200 
10002400 
100038002
10011400 
10012800 
1001316004
SUM 42006

 

I want to create a card that could present the sum of Revenue pr #items sold pr order + the average revenue pr item sold. 

 

Any suggestion would be highly apreciated

 

Christian

1 ACCEPTED SOLUTION
v-huizhn-msft
Employee
Employee

Hi @Christian87,

It's still confusing. You want to calculate the sum of average group by items sold and order? The average revenue pr item sold is (200+400+800+400+800+1600+4200)/(2+4+6)=700? If it is you can create a new table using the following formula by clicking "New Table" under Modeling on home page. 

NewTable=SUMMARIZE(Table,Table[items sold],Table[Order],"Sum revenue",SUM(Table[Revenue]))


Then create a calculated column in 'NewTable' to get the result.

result=NewTable[Sum revenue]+SUMX(ALL(Table),Table[revenue])/SUMX(ALL(Table),Table[item sold])


Best Regards,
Angelia

 

View solution in original post

1 REPLY 1
v-huizhn-msft
Employee
Employee

Hi @Christian87,

It's still confusing. You want to calculate the sum of average group by items sold and order? The average revenue pr item sold is (200+400+800+400+800+1600+4200)/(2+4+6)=700? If it is you can create a new table using the following formula by clicking "New Table" under Modeling on home page. 

NewTable=SUMMARIZE(Table,Table[items sold],Table[Order],"Sum revenue",SUM(Table[Revenue]))


Then create a calculated column in 'NewTable' to get the result.

result=NewTable[Sum revenue]+SUMX(ALL(Table),Table[revenue])/SUMX(ALL(Table),Table[item sold])


Best Regards,
Angelia

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.