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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sdhn
Responsive Resident
Responsive Resident

Title Change

Hello All,

 

I am using Power Bi desktop to create reports.

For title of report I am using following code:

 

Title =
VAR __selected = ALLSELECTED( MailPackage[MONTHS] )
RETURN
IF(
COUNTROWS( __selected ) = 12,
"Yearly Analysis",
"Monthly Packages of " & UNICHAR( 10 )
& CONCATENATEX( __selected, MailPackage[MONTHS], " , " & UNICHAR( 10 ) )
)
 
It dispays in title as: 

Monthly Mail Volume Fiscal Year 2021-2022

Monthly Packages of Feb, Mar, Apr, May 
 
I want to disaply only title as: 

"Monthly Mail Volume Fiscal Year 2021-2022"

 

Any help will be appreciated.

 

Thanks 

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @sdhn 

I think the logic of your code is to return different titles based on counting of month you select in slicer, if you select all 12 months, title will return "Yearly Analysis", if you select part of them, title will return "Monthly Packages of...,...,... .

I couldn't find "Monthly Mail Volume Fiscal Year 2021-2022" in your code. If you only want to get a defined title, you can change your code to return a text :Monthly Mail Volume Fiscal Year 2021-2022, or change your title directly.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.