Forum Discussion

smpa01's avatar
smpa01
Community Champion
7 years ago
Solved

Testing if integer in PBI (M not DAX)

Hello experts,   Is it possible for M to test whether my number values are integers?   Column1 0.2212 0.45554321 0.6 0.84321896 1 1.2 1.000004 1.76219026 1.8212154 ...
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    7 years ago

    smpa01 

     

    How about this as a custom column

     

    =if [Column1]=Int64.From([Column1]) then "T" else "F"
  • Ashish_Mathur's avatar
    7 years ago

    Hi,

    In the Query Editor, use this M code

    =if Number.Mod([Column1],1)=0 then "T" else "F"

    Hope this helps.