Forum Discussion

Torbenan's avatar
Torbenan
Helper I
6 years ago

If statement reversed

 
 

I've the simplest possible measure.

simple if = IF(2>1,3,4). It returns 4!!
 
 


If I write it like this (see spaces)
simple if = IF(2>1, 3, 4). It returns The syntax for '3.' is incorrect. (DAX(IF(2>1. 3. 4))).



What can cause this



4 Replies

  • I tried, with or without space, it also returns 3.

     

    simple if = IF(2>1,3,4)

     

    Can you share screenshot, what exactly is the problem

    • Torbenan's avatar
      Torbenan
      Helper I

      I've updated the orignal post with screen shots

       

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi Torbenan ,

     

    I have tested it for many times, it always returns 3 without any error.

    You could re-install Power BI and check if it works.

     

    • Torbenan's avatar
      Torbenan
      Helper I

      Tried a reinstall, but that did not help

      I tried this measure.

       

      Notice that the "," I put into the formula is replace with a "." in the error message. It might be regional settings, which is the issue.