cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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:

Does anyone have any suggestions on how to accomplish this?

1 ACCEPTED SOLUTION
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?

Please give Kudos or Mark as a Solution!

Proud to give back to the community!
Thank You!

3 REPLIES 3
Community Support

Hi @Kfausch ,

Best Regards,
Kelly

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?

Please give Kudos or Mark as a Solution!

Proud to give back to the community!
Thank You!

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])

Announcements

#### 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.

#### Power BI Monthly Update - August 2024

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

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors