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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

ROUNDUP in SQL

Hi, I've used ROUNDUP in my report as per the requirement.

 

TotalPoints = IF(sum(Points)> 0.1
, FORMAT(ROUND(SUM(Points),1),"0.0")
, FORMAT(ROUNDUP(sum(Points),2),"0.00")) -- If less than 0.1, ex: 0.001, I want 0.01
am getting desired output in the report as user requested. Now am in the process writing test cases using SQL for validation and not able to re-produce the same output using SQL.  what is the equivalent of ROUNDUP in SQL?
 
  • CEILING is always rounding to nearest WholeNumber -- giving me 1.
  • CAST(Points as decimal(16,2)) --- is giving me 0
  • CAST(Points as decimal(16,3)) --- is giving me 0.002  - 3 Decimals (i want only 2 decimals).

Please help me.

 

 
2 REPLIES 2
Anonymous
Not applicable

Hi,

 

I think you will need to have this question posted in a SQL msdn Forum. But, Have you tried using ROUND() Function? The below is the link.

 

https://docs.microsoft.com/en-us/sql/t-sql/functions/round-transact-sql?view=sql-server-ver15

 

Best Regards,
Vignesh M

If what I suggested worked for you feel free to Drop a "Kudos" and Consider to "Accept as Solution" if I solved your Issue 🙂

Anonymous
Not applicable

Thank you, @Anonymous  yes, I posted in SQL community also.  

still no luck.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.