Forum Discussion
Power BI roundup not calculating correctly
- 1 year ago
Hi RealTrentG ,
Thank you for reaching out to Microsoft Community.
I hope the below measure works as per your requirement.MERCH REQD = ROUNDUP(SUM('Table (2)'[PIECES]) / 3000, 0)
If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.
Thanks,
Chaithra E.
hello RealTrentG
yes, as you mentioned table visual total value is summing so 3,00 +1,00.
you need to change [MERCH REQD] so it will collect 3,00.
if you want to get that 3,00, then you might want to use MAX for [MERCH REQD] instead of SUM because you want to get the highest value.
Thank you.
Not exactly. I want so sum the pieces first and then calculate the MERCH REQD. In this example, it works out that I should end up with 3.00 since 7,793/3,000 = 2.6, which rounds up to 3.00. But in the scenario below, if I use the MAX function I would end up with 3.00 MERCH REQD, but I should have 5.00 based on the Total PIECES of 12,500 (12,500/3,000 = 4.17, roundup to 5.00)
| Type | PIECES | Divide 3,000 | Roundup/MERCH REQD | |
| A | 8,000 | 2.67 | 3.00 | |
| B | 4,500 | 1.50 | 2.00 | |
| TOTAL | 12,500 | 4.17 | 5.00 |
Thanks again
- Irwan1 year ago
Super User
hello RealTrentG
i am confused.
based on your previous post, i assumed you want to get the max value then use MAX.
if you want to get sum, then use sum.
Total calculation in table is based on what function you are using.
using ROUND() to round closest value
using ROUNDUP() to roundup closest value.
Thank you.
- v-echaithra1 year ago
Community Support
Hi RealTrentG ,
Thank you for reaching out to Microsoft Community.
I hope the below measure works as per your requirement.MERCH REQD = ROUNDUP(SUM('Table (2)'[PIECES]) / 3000, 0)
If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.
Thanks,
Chaithra E.