Forum Discussion

CetinT's avatar
CetinT
Frequent Visitor
2 years ago
Solved

Using LEN in LEFT

Hi Everbody,


I want to count the characters in a column, subtract a certain number of characters from this number and then shorten it.
But it gives an error. Below is the DAX code I use. Is it possible for you to help?

LEFT(SALES[W_HOUSE]; LEN(SALES[W_HOUSE])-2)

 

  • Hi, CetinT 

    CetinT 

    create new calculated column

    Column = LEFT('Table'[W_HOUSE],LEN('Table'[W_HOUSE])-2)

     

    or YOU can create measure 

    Measure = MAXX('Table',LEFT('Table'[W_HOUSE],LEN('Table'[W_HOUSE])-2))

     

     

5 Replies

  • Dangar332's avatar
    Dangar332
    Resident Rockstar

    HI, CetinT 

    LEFT(SALES[W_HOUSE], LEN(SALES[W_HOUSE])-2)

    use ( , )  instead of  ( ; )

    • CetinT's avatar
      CetinT
      Frequent Visitor

      Thanks for your suggestion. But due to the regional settings of my computer I have to use ( ; ).