DAX – How to get a line break in a DAX measure for Labels or Titles in a Power BI report?
Once again, I really enjoy working with Power BI and in the data and analytics space.
I was at a customer and they were drilling through between pages, and I wanted to put in what the filter selections were when they drilled through to the new page.
This would allow them to easily see what had been on the previous page, and to avoid going backwards and forwards.
I quickly created the DAX measure to show the filters, but one thing that bugged me was that it looked a bit clunky and not clear in terms of what the filters were.
I knew that I wanted to use a Line Break to put each filter on a new line. I then remembered that in DAX I can use the UNICHAR character set.
I will use an example below to show what it looked like before and after.
This is what my sample data looked like.
DAX Measure with No Line Breaks
Below is my DAX measure and what it looked like with no line breaks.