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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

divide the columns and summarize results in total

Hello everyone! 

 

I had some trouble with DAX expression.

When I try to divide two measures and summarize its result as a whole, it shows me the results of a divided total of two columns, this is not what I expected.

For example:

 

Nomenclature qty - sales qty in box result expected 
 a 10255
 b 20377
 c 30488
 d 40588
 a 2021010
 b 3031010
 total 15019848

*qty - sales and qty in box from different tables

 

If you have any solution, please share, thanks a lot!

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , try like

sumx(summarize(Table, Table[Nomenclature], "_1",sum(Table[qty]),"_2",sum(Table[qty in box])),divide([_1],[_2]))

Or

sumx(values(Table[Nomenclature]), Divide(sum(Table[qty]),sum(Table[qty in box])))

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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