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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
EugenioBeltran
Frequent Visitor

Round and divide DAX formula

Hello, i am looking for a DAX formula that combines divide and round, in example i ha tried round(divide(table1[cases],table1[cases per pallet],0) but it gives me an errors

 

Thank you for your help

3 ACCEPTED SOLUTIONS
andhiii079845
Super User
Super User

Do you use this as a measure? This will not work. You use columns without a minx,maxx or sumx...
Or do you use it as a calculated column? 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

andhiii079845
Super User
Super User

round(divide(table1[cases],table1[cases per pallet],0) a bracket is missing. 

round(divide(table1[cases],table1[cases per pallet]),0)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

v-zhangti
Community Support
Community Support

Hi, @EugenioBeltran 

 

You can try the following methods.
Sample data:

vzhangti_0-1678341270511.png

Measure = ROUND(DIVIDE(SELECTEDVALUE('Table'[Cases]),SELECTEDVALUE('Table'[Cases per pallet])),0)
Measure 2 = ROUND(DIVIDE(SUM('Table'[Cases]),SUM('Table'[Cases per pallet])),0)

vzhangti_1-1678341338199.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-zhangti
Community Support
Community Support

Hi, @EugenioBeltran 

 

You can try the following methods.
Sample data:

vzhangti_0-1678341270511.png

Measure = ROUND(DIVIDE(SELECTEDVALUE('Table'[Cases]),SELECTEDVALUE('Table'[Cases per pallet])),0)
Measure 2 = ROUND(DIVIDE(SUM('Table'[Cases]),SUM('Table'[Cases per pallet])),0)

vzhangti_1-1678341338199.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

andhiii079845
Super User
Super User

round(divide(table1[cases],table1[cases per pallet],0) a bracket is missing. 

round(divide(table1[cases],table1[cases per pallet]),0)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




EugenioBeltran
Frequent Visitor

It we works if I do =[cases]/[cases per pallet] but it does not work when I add round([cases]/[cases per pallet],0)

andhiii079845
Super User
Super User

Do you use this as a measure? This will not work. You use columns without a minx,maxx or sumx...
Or do you use it as a calculated column? 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I use it as a measure, , row by row 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.