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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Tob_P
Helper V
Helper V

ROUNDUP not working as expected

Hi,

 

I have a two measures for "Courses", the first a simple multiplication, the second a ROUNDUP version of the previous measure, both working as expected. I want to multiply the two measures by each other (in this example, the values are 8 x 8 to achieve 64).

 

Here's my new measure...

 

m2 =
VAR Courses = ROUNDUP([Courses], 1)
VAR Metres = 'SL Metres Parameter'[SL Metres Parameter Value]
RETURN
Courses*Metres
 
...this returns 60. Even if I change VAR Courses to Measure 2, it returns the same value (in this case it is multiplying 7.5 * 😎
Tob_P_0-1725455628465.png

 

How can I fix this so that it returns 64, as it should?
1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @Tob_P 

It seems that your issue is related to function ROUNDUP.

As in your example value for one of your VAR is 7,50 (Metres) so you probably expect 8,00? Which should lead later to 64 (8*8=64).

Still, function ROUNDUP in DAX function with specific behaviour for your case 7,50. Check link with example

 

To get 64 in your case just adjust your part with ROUND (no UP at and) and 0 for end. 

VAR Courses = ROUND('SL Height Parameter'[Courses], 0)




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

Proud to be a Super User!






View solution in original post

7 REPLIES 7
some_bih
Super User
Super User

Hi @Tob_P 

It seems that your issue is related to function ROUNDUP.

As in your example value for one of your VAR is 7,50 (Metres) so you probably expect 8,00? Which should lead later to 64 (8*8=64).

Still, function ROUNDUP in DAX function with specific behaviour for your case 7,50. Check link with example

 

To get 64 in your case just adjust your part with ROUND (no UP at and) and 0 for end. 

VAR Courses = ROUND('SL Height Parameter'[Courses], 0)




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

Proud to be a Super User!






Hi @some_bih - thank you and obviously works a treat - so straightforward really!

 

Thanks again.

dharmendars007
Memorable Member
Memorable Member

Hello @Tob_P , 

 

Please use the below DAX in the Variable Courses..

 

dharmendars007_0-1725457150453.png

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

some_bih
Super User
Super User

Hi @Tob_P red coloured part below is measure definition, not column definition as in VAR Metres. It should be probably as in m2_test, assuming the data for both VAR's coming from single tableb and Courses is column

m2 =
VAR Courses = ROUNDUP([Courses]1)
VAR Metres = 'SL Metres Parameter'[SL Metres Parameter Value]
RETURN
Courses*Metres
 
 
m2_test=
VAR Courses = ROUNDUP('SL Metres Parameter'[Courses], 1)
 
VAR Metres = 'SL Metres Parameter'[SL Metres Parameter Value]
RETURN
Courses*Metres




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

Proud to be a Super User!






@some_bih 

Thank you, gave that a go but no luck. Courses isn't actually a column within a table - I'm using Parameters so it's the Parameter Value divide by another measure, so I wonder if that's the issue that it won't round up accurately?

Hi @Tob_P please share model and relationships for more possible solutions. If both VAR are columms, it should be simple.





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

Proud to be a Super User!






Hi @some_bih 

 

Link to .pbix...

 

https://drive.google.com/file/d/1PUQzM_7DMh_y5Yp8qbi-PMFWWkekL1RB/view?usp=sharing

 

The bottom two sections are what I'm referring to.

 

Thanks

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.