Forum Discussion

CarlsBerg999's avatar
CarlsBerg999
Helper V
5 years ago
Solved

IF statement not working

Hi,

 

Im trying to write a simple if stamenet but it doesn't work with numbers or measures.

IF(SUM('table1'[Column1]) = 50000,1,2) --> Doesnt work. Says "Too few arguments were passed to the IF function. The minimum argument count for the function is two. 
 
IF(SUM('table1'[Column1]) = "50000",1,2) ---> Works.  
 
What is wrong with the first version?
  • CarlsBerg999's avatar
    CarlsBerg999
    5 years ago

    Actually this got fixed with putting an additional space. For example 50000 , ValueIfTrue

    Before i had 50000,ValueIfTrue

3 Replies

  • Hi CarlsBerg999 

    There's nothing syntcatically wrong with your first version

     

    IF(SUM('table1'[Column1]) = 50000,1,2)

     

    So it must be something else.  Is this the entirety of the code?

    What is your decimal separator?  Comma or period?  

    regards

    Phil

    • CarlsBerg999's avatar
      CarlsBerg999
      Helper V

      Actually this got fixed with putting an additional space. For example 50000 , ValueIfTrue

      Before i had 50000,ValueIfTrue