Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DAX need help for function

What should the formula in Power BI look like if you always wanted to take the first two digits and if the second digit is a minus then the third and fourth digits as you can see in the attached scre...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Anonymous , try this calculated column:

     

    NewColumn = 
      IF(
        MID('Table'[ExistingColumn', 2, 1) = "-",
        MID('Table'[ExistingColumn', 3, 2,
        LEFT('Table'[ExistingColumn',2)
      )