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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.