Forum Discussion
ArchStanton
Power Participant
2 years agoCannot remove decimal places
Hi, This is driving me mad, hope someone can help! The code below defaults the Average Months to 2 decimal places - I don't want any decimals. Case Length (Adj) Mths =
IF (
'Cases'[sta...
- 2 years ago
Daniel29195
Community Champion
2 years agouse format ( your_measure_code , "##")
let me know if this works .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
- ArchStanton2 years ago
Power Participant
Hi,
Using FORMAT breaks the code and my Average average disappears:
Case Length (Adj) Mths = FORMAT( IF ( 'Cases'[statecode] = "Active", DATEDIFF ( IF ( ISBLANK ( 'Cases'[legacycasecreationdate] ), 'Cases'[Created On], 'Cases'[legacycasecreationdate] ), NOW (), MONTH ), DATEDIFF ( IF ( ISBLANK ( 'Cases'[legacycasecreationdate] ), 'Cases'[Created On], 'Cases'[legacycasecreationdate] ), 'Cases'[Resolution Date], MONTH ) ),"##")