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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ShivaPrasad1
Helper I
Helper I

Dynamic title with filter selections

Hello Team,

 

I need to show the title of the report as Sales Report - September 2018. In my report there are two filters called month and year. Based on the filters title month and year value need to be changed. If no filter is selected I need to show latest month and year available in the given data. Some one help me in this regard.

 

 

2 REPLIES 2
BobBI
Resolver III
Resolver III

Hi Shiva,

 

Create a measure "ReportTitle"

copy & paste below  DAX and change the table/field name as per your setup.

 

 ReportTitle =
VAR ReportName = "Sales Report"
VAR SelectedMonth =  IF( ISFILTERED( 'Date'[MonthShort]), SELECTEDVALUE('Date'[MonthShort]),"")
VAR SelectedYear =   IF( ISFILTERED( 'Date'[Year]), SELECTEDVALUE('Date'[Year]),"")
RETURN
   
    IF(

          SelectedMonth="" && SelectedYear="",

                                                "Latest Report",

                                                ReportName & "-" & SelectedMonth & " " & Selectedyear
         )

 

 

 

'Date' is a calendar table having 'Monthshort' and Year as fields

 MonthShort = FORMAT('Date'[Date],"MMM")

Year = Year = FORMAT('Date'[Date],"YYYY")

 

 I tested this okay , hope it works for you too.

 

Cheers,

Bob

 

@BobBI thanks for the solution. But we need default approach as well for the requirement. If no value is selected in month and year filters we need to show most recent month and year. This default requirement also to be met.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors