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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Kfausch
Helper II
Helper II

ROUNDUP only on decimal

Hello,

 

I am trying to write a formula that rounds all numbers with a decimal up to the nearest whole number. My issue is that if the number is already a whole number it rounds the number, but I only want to round if there is a decimal.

 

Current formula:

Pallet Qty = ROUNDUP([Quantity On-Hand] / (CALCULATE(SUM('Item UOM'[Qty_per_Unit_of_Measure]), 'Item UOM'[Code] = "pallet") -1),0)
Result:
PBI.JPG
Want I want instead:
Excel.JPG
 
Does anyone have any suggestions on how to accomplish this?
 
Thanks for reading!
1 ACCEPTED SOLUTION
fhill
Resident Rockstar
Resident Rockstar

Column 'Table (2)'[QOH] / 'Table (2)'[Quantity per]
ROUND_UP - ROUNDUP('Table (2)'[Column],0)

Just using some quick math, I couldn't duplicate your problems, so I'm thinking it has something to do with the Calculate Nested function in the RoundUP. Have you tried to allow the Round_Up to reference your 'Qty Case/Tote' column (or is it a measure?) without doubled the math again in the formula?

fhill_0-1603309103429.png




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @Kfausch ,

 

Is your issue solved now?

 

Best Regards,
Kelly

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

fhill
Resident Rockstar
Resident Rockstar

Column 'Table (2)'[QOH] / 'Table (2)'[Quantity per]
ROUND_UP - ROUNDUP('Table (2)'[Column],0)

Just using some quick math, I couldn't duplicate your problems, so I'm thinking it has something to do with the Calculate Nested function in the RoundUP. Have you tried to allow the Round_Up to reference your 'Qty Case/Tote' column (or is it a measure?) without doubled the math again in the formula?

fhill_0-1603309103429.png




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




amitchandak
Super User
Super User

@Kfausch , try with some if condition like

 

Pallet Qty = divide([Quantity On-Hand] , (CALCULATE(SUM('Item UOM'[Qty_per_Unit_of_Measure]), 'Item UOM'[Code] = "pallet") -1))

 

if
Pallet Qty new = if(max(table[desciption]) in {"A","B","C"} , round([Pallet Qty],0),[Pallet Qty])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors