Forum Discussion
ArchStanton
2 years agoPower Participant
Cannot 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
2 years agoCommunity Champion
use 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 agoPower 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 ) ),"##")