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
Areef
Frequent Visitor

Get the slected slicer value and use it to get the text from another column for a dynamic header

Hi my scenario is that I have a calendar table in my report per below. I have a report page filter by the Date column (Can only filter 1 date at a time).  Is it possible to create a measure such that when a page filter is used to select a Date it uses the data from the corresponding Year and Month columns shown below to generate text which I can use as a dynamic Report page header?

For e.g. if the Date was filtered to 2019-04 from below the dynamic text generated would be "Report for period ended Apr 2019"

 

Areef_0-1636113136746.png

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

HI @Areef 

 

You can do this with a measure and take the values directly from the selected date e.g.

 

Measure = "Report for period ended " & FORMAT(MONTH(SELECTEDVALUE('Table'[Date])),"mmm") & " " & YEAR(SELECTEDVALUE('Table'[Date]))

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

4 REPLIES 4
Areef
Frequent Visitor

Philip thank you very much for your help.  Keep up the good work you & Mynda continue to do

PhilipTreacy
Super User
Super User

HI @Areef 

 

You can do this with a measure and take the values directly from the selected date e.g.

 

Measure = "Report for period ended " & FORMAT(MONTH(SELECTEDVALUE('Table'[Date])),"mmm") & " " & YEAR(SELECTEDVALUE('Table'[Date]))

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Slight modification to formula.  What worked was:

Dynamic Header Unconsol = "Report for Period ended - " &format(SELECTEDVALUE('Unconsol Calendar'[Date]),"MMMM YYYY")
 
When I used your initial formula apparently the MONTH part of your  formula was picking up only January rather than the month I was filtering for.  If not for your formula would have never tried and tested and eventually got through
Areef
Frequent Visitor

Thanks again Philip and keep up your great work

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.