Forum Discussion
Convert Date to MMM YYYY with Display title function
- 4 years ago
Hi evahohk
Thanks for your reply.
>> If I select Period Ending January 2022, then it will show the heading as Reporting period : Jan 2022
You can try this measure
title = "Reporting period : " &FORMAT( SELECTEDVALUE('Table'[Column1]),"MMM YYYY")>> select period ending January 2022 to February 2022, it will show Reporting period : Jan 2022 to Feb 2022
In fact, if only one date is selected, the above effect cannot be achieved, so usually we need to select two dates in the slicer to get the period
try this measure,
title = IF(ISFILTERED('Table'[Column1]),IF(ISBLANK(SELECTEDVALUE('Table'[Column1])),"Reporting period : "&FORMAT( minx(ALLSELECTED('Table'),[Column1]),"MMM YYYY")&" to "&format(MAXX(ALLSELECTED('Table'),[Column1]),"MMM YYYY"),"Reporting period : " &FORMAT( SELECTEDVALUE('Table'[Column1]),"MMM YYYY")))Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi evahohk
>> I have used display title function to display text box value based on filters in Power BI
Could you share some sample data in 'ABC Data'[Period Ending]? (If you can't share files, you can share screenshots, thanks.)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- evahohk4 years ago
Helper I
Hi Tang,
How can I change the dynamic heading based on selection ?
e.g. If I select Period Ending January 2022, then it will show the heading as Reporting period : Jan 2022
or select period ending January 2022 to February 2022, it will show Reporting period : Jan 2022 to Feb 2022- v-xiaotang4 years ago
Community Support
Hi evahohk
Thanks for your reply.
>> If I select Period Ending January 2022, then it will show the heading as Reporting period : Jan 2022
You can try this measure
title = "Reporting period : " &FORMAT( SELECTEDVALUE('Table'[Column1]),"MMM YYYY")>> select period ending January 2022 to February 2022, it will show Reporting period : Jan 2022 to Feb 2022
In fact, if only one date is selected, the above effect cannot be achieved, so usually we need to select two dates in the slicer to get the period
try this measure,
title = IF(ISFILTERED('Table'[Column1]),IF(ISBLANK(SELECTEDVALUE('Table'[Column1])),"Reporting period : "&FORMAT( minx(ALLSELECTED('Table'),[Column1]),"MMM YYYY")&" to "&format(MAXX(ALLSELECTED('Table'),[Column1]),"MMM YYYY"),"Reporting period : " &FORMAT( SELECTEDVALUE('Table'[Column1]),"MMM YYYY")))Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.