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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
evahohk
Helper I
Helper I

Convert Date to MMM YYYY with Display title function

I have used display title function to display text box value based on filters in Power BI

DisplayTitle  =

"Reporting period : "
& CONCATENATEX (
VALUES(('ABC Data'[Period Ending]))
, ('ABC Data'[Period Ending])
," , "
)



That's how it shows in the table How can I change it from 1/3/2022 to Mar 2022 ?How can I change it from 1/3/2022 to Mar 2022 ?
I'm looking for formula to change 1/3/2022 to Mar 2022 in the above coding 
1 ACCEPTED SOLUTION

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")

 

 

vxiaotang_0-1659235908159.png

>>  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")))

 

vxiaotang_1-1659240565804.png

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.

View solution in original post

9 REPLIES 9
v-xiaotang
Community Support
Community Support

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.

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

evahohk_0-1657148123872.png

 

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")

 

 

vxiaotang_0-1659235908159.png

>>  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")))

 

vxiaotang_1-1659240565804.png

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.

Nathaniel_C
Community Champion
Community Champion

Hi @evahohk , right click on your file and go to share, then copy link.  You can then post the link in your reply.

Nathaniel

 

 

Nathaniel_C_0-1656900388679.png

Nathaniel_C_1-1656900653680.png

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




It couldn't generate a link. 

Nathaniel_C
Community Champion
Community Champion

Hi @evahohk 

Please try this:

Format = 

var _date = FORMAT(MAX('Table'[Column1]),"MMM YYYY")

return concatenate ("Reporting period : ",_date)

Nathaniel_C_1-1656894256844.png


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks getting back to me. Sorry that I'm still a beginner of Power BI
Can you please advise the procedure ? Do I need to create a new measure as below ? 

Format = 

var _date = FORMAT(MAX('Table'[Column1]),"MMM YYYY")

return concatenate ("Reporting period : ",_date)

 or how can I add the above coding in DisplayTitle ? 

DisplayTitle  =

"Reporting period : "
CONCATENATEX (
VALUES(('ABC Data'[Period Ending]))
, ('ABC Data'[Period Ending])
," , "
)

Hi @evahohk ,

Please tell me why you wrote your measure with Values() and Concatenex()? Can you share your .pbix?


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I actually copied measures from another website. 
How can I change the dynamic heading based on selection ?
e.g. Period Ending January 2022, then it will show Reporting period : Jan 2022
or select period ending January 2022 to February 2022, it will show Reporting period : Jan 2022 to Feb 2022
Sorry I'm not too sure how can I share .pbix. in this platform. 
I have attached screenshot of the Power BI file. Test 04072022.JPG

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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