Forum Discussion
CarlsBerg999
5 years agoHelper V
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?
Actually this got fixed with putting an additional space. For example 50000 , ValueIfTrue
Before i had 50000,ValueIfTrue
3 Replies
- PhilipTreacySuper User
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
- CarlsBerg999Helper V
Actually this got fixed with putting an additional space. For example 50000 , ValueIfTrue
Before i had 50000,ValueIfTrue
- PhilipTreacySuper User
Hi CarlsBerg999
That doesn't make much sense. Unless you use comma as decimal separator?
Regards
Phil