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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Dax Help

penn = Divide (Sumx('Detail',[new unit]), SUM( 'Dealer Summary'[Regs]))
 
This formula should be dividing the REG by the UNITS
 
example :
Unit 261 
Reg 155 
= 0.59
=59%
 
However, when switching the formula it doesnt work to get that answer instead its giving me 168%
2 ACCEPTED SOLUTIONS
goncalogeraldes
Super User
Super User

Hello there @Anonymous ! DO you need the SUMX() in the formula or does a SUM() work? Try and see if this works:

penn = 
var _newunit = SUM('Detail'[new unit])
var _regs = SUM( 'Dealer Summary'[Regs])

return
Divide ( _newunit, _regs )

 Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!

Best regards,
Gonçalo Geraldes

View solution in original post

Anonymous
Not applicable

Seems to be related to the tables, relationships and dates

View solution in original post

6 REPLIES 6
Kumail
Impactful Individual
Impactful Individual

Hello
If you could send a sample .pbix that demonstrates what you are looking to get. It would really help to provide you a quick solution.
You can send the sample .pbix file by adding it to your drive or dropbox and add the link here. 
Regards
Kumail Raza

goncalogeraldes
Super User
Super User

Hello there @Anonymous ! DO you need the SUMX() in the formula or does a SUM() work? Try and see if this works:

penn = 
var _newunit = SUM('Detail'[new unit])
var _regs = SUM( 'Dealer Summary'[Regs])

return
Divide ( _newunit, _regs )

 Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!

Best regards,
Gonçalo Geraldes

Anonymous
Not applicable

Seems to be related to the tables, relationships and dates

Anonymous
Not applicable

That still gives me the same result

@Anonymous I think you got it backwards... Try this:

penn = 
var _newunit = SUM('Detail'[new unit])
var _regs = SUM( 'Dealer Summary'[Regs])

return
Divide ( _regs , _newunit)

 

Anonymous
Not applicable

This is giving me all results as over 100%

Not sure what the issue could be 

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.