Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Apple08
Helper IV
Helper IV

Dynamic title

Hi all

 

I would like to have a dynamic title for a table, the title includes the dates and a code when users select from slicer.  I got the formula below to add in the week ending Friday date and it works (however I don't quite understand the UNICHAR (10) and I just copied it from Google and it seems works).  Now I need to add in the code and I have issue as the code is a combination of number and character, e.g. 2122AB

 

Please could anyone help me how to edit the formula below:

 

Titel = "Report - "SELECTEDVALUE(Dates[Week Ending Friday]) & UNICHAR(10) & "update at "Selectedvalue('Code[report_code]) & UNICHAR (10)
 
Many thanks.
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

UNICHAR(10) is a line break

https://powerbidocs.com/2020/11/17/how-to-add-line-breaks-in-a-string-of-text-in-dax-measure/

 

What is the issue with the code? A combination of numbers and characters should be stored as text and concatenate just fine.

View solution in original post

4 REPLIES 4
Apple08
Helper IV
Helper IV

It works now!  Sorry it's my mistake I forgot to select the slicer, many thanks Alex! 🙂

Apple08
Helper IV
Helper IV

Sorry, the formula doesn't work is:

 

Title = "Report - "SELECTEDVALUE(Dates[Week Ending Friday]) & UNICHAR(10) & "update at "Selectedvalue('Code'[report_code])

 

I have typo missing the ' from the Code above.

AlexisOlson
Super User
Super User

UNICHAR(10) is a line break

https://powerbidocs.com/2020/11/17/how-to-add-line-breaks-in-a-string-of-text-in-dax-measure/

 

What is the issue with the code? A combination of numbers and characters should be stored as text and concatenate just fine.

Thank you, then I don't require a line break at the end of the formula.  However, even I have removed the last bit, the code doesn't show.

 

Title = "Report - "SELECTEDVALUE(Dates[Week Ending Friday]) & UNICHAR(10) & "update at "Selectedvalue('Code[report_code])

 

The title shows as Report - 15 October 2021

update at

 

The code supposes to be appeared after the text 'update at 2122AB'

 

2122AB is a text.

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.