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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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