Forum Discussion

Sean-OReilly's avatar
Sean-OReilly
Helper IV
5 years ago
Solved

Change Format on Measure Formula Result

Hi

 

How do i Remove the .00 from the below measure result?

 

Days to Ins Expiry = if([Today]<[Ins Exp Date],DATEDIFF([Today],[Ins Exp Date],day),"Expired")
 

 

  • Hmm, I would say just define the measure as a whole number in the measure formatting, but if you've got the possibility of it being text, then I guess that wouldn't work? Not sure why it's displaying .00 as that makes no sense in a datediff context, unless it defaults anything to having two decimal places. Try going INT(DATEDIFF([Today],[Ins Exp Date],day)) or TRUNC(DATEDIFF([Today],[Ins Exp Date],day)) perhaps?

2 Replies

  • jthomson's avatar
    jthomson
    Solution Sage

    Hmm, I would say just define the measure as a whole number in the measure formatting, but if you've got the possibility of it being text, then I guess that wouldn't work? Not sure why it's displaying .00 as that makes no sense in a datediff context, unless it defaults anything to having two decimal places. Try going INT(DATEDIFF([Today],[Ins Exp Date],day)) or TRUNC(DATEDIFF([Today],[Ins Exp Date],day)) perhaps?

    • Sean-OReilly's avatar
      Sean-OReilly
      Helper IV

      Thanks J - the INT function at the start of the datediff formula done the trick