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
funklordofusa
Helper I
Helper I

MROUND

I'm using MROUND to assist in preparing a purchase forecast to give to a supplier based upon our sales forecast and their minimum order quantity.

 

The basic dax for my column is: 

     IF( Column A = "parameter X", MROUND( [forecasted sales units], [minimum order quantity] ) )

 

However, there is a remark for MROUND: MROUND rounds up, away from zero, if the remainder of dividing number by the specified multiple is greater than or equal to half the value of multiple.

 

In my case, let's say the forecasted sales units = 4 per month and the minimum order quantity = 9.  The dax is rounding down based upon the remark but I would prefer it to always round up to the multiple.

 

Is it possible to basically combine MROUND (for the multiple) and ROUNDUP?

 

Thanks,

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @funklordofusa 

You should be able to use the CEILING function for this purpose:

CEILING ( [forecasted sales units], [minimum order quantity] )

 

Regards,

Owen

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hi @funklordofusa 

You should be able to use the CEILING function for this purpose:

CEILING ( [forecasted sales units], [minimum order quantity] )

 

Regards,

Owen

 


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Perfect, Owen.  This is exactly the dax I was looking for.

Thanks!

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.

Top Solution Authors