Forum Discussion
Rounding Issues
- 6 years ago
Hi tyleharris ,
Try this:
Measure = IF ( HASONEVALUE ( 'Table'[Column1] ), ROUND ( MAX ( 'Table'[Column2] ), 2 ), SUMX ( 'Table', ROUND ( MAX ( 'Table '[Column2] ), 2 ) ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jthomson
Now that you put it that way, I'm not so sure haha. Is there a way to simply truncate the decimals to the 2nd decimal place? I know this can be done in excel, but the DAX function Trunc() returns intergers.
Also, everything is currently in millileters. The measure just looks to see if it's a Liter and if it is, it converts to millieters before doing the rest of the calculation. I'm also in a live connection, so I can't create caluated columns without taking the data out and putting it back in. I'm hoping to solve it in my native live connection, that is, if it's possible.
Thank you!
Hi tyleharris ,
Try this:
Measure =
IF (
HASONEVALUE ( 'Table'[Column1] ),
ROUND ( MAX ( 'Table'[Column2] ), 2 ),
SUMX ( 'Table', ROUND ( MAX ( 'Table '[Column2] ), 2 ) )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.