powerbivisualizationpowerbi-desktopvega-litedeneb

add a linebreak in lengthy expressions


Is it possible to add a linebreak in a lengthy expression string?

sample expression in a calculate transform

{"calculate": "slice(['female', 'male'], indexof(['female', 'male'], datum['gender']), indexof(['female', 'male'], datum['gender'])+1)",
    "as": "testing"
    }

I want to add line breaks for better readibility. Something like this

{"calculate": "slice(['female', 'male'], 
indexof(['female', 'male'], datum['gender']), 
indexof(['female', 'male'], datum['gender'])+1)",
    "as": "testing"
    }

Solution

  • It is not possible unfortunately. You can use signals as variables to make the expressions shorter and easier to debug.