Forum Discussion

MBroman's avatar
MBroman
New Member
1 year ago
Solved

Using Text.Length in an IF Statement

Hello, I am trying convert an Excel formula to be used in Power Query. The Excel formula is =IF($K2>0,"Account",IF(LEN($H2)>3,"5 Dig","3 Dig")). From my research I've come up with the following formu...
  • PwerQueryKees's avatar
    1 year ago

    I am pretty sure the M Code you gave is not the actual M code giving the error, because ther is a syntax error in it. No closing ) for the Text.Length()

    Please post (screenshots of) your data, some or all of the surrounding M Code and a screenshot of the error. By the look of it, the error might occur somewhere else...