Forum Discussion
Dynamic title with filter selections
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.