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
Anonymous
Not applicable

Create a custom measure for a title using min and max dates

Hi there

 

I have a dynamic title which shows the time period a user is looking at based on the period they've selected from my date slicer. 

The measure looks like this:

Title Sub Report = "CURRENTLY VIEWING MONTHS " & MIN('DimReportingPeriod'[Reporting Period]) & " TO " & MAX('DimReportingPeriod'[Reporting Period])
 
My problem, is the title shows the months as dd/mm/yyyy and it looks rubbish.
Within the DimReportingPeriod table, alongside the 'Reporting Period' date column is a text column called 'Reporting Name' which shows the associated 'mmmm yyyy' of the date. 
 
So, I want my title to show the 'Reporting Name' for the MIN of 'Reporting Period', and the 'Reporting Name' for the MAX of 'Reporting Period'.
 
I tried doing this using a CALCULATE and SELECTEDVALUE but it's not working.
 
Help!!!
 
Jemma 
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

You can put it this way as well:

Title Sub Report = "CURRENTLY VIEWING MONTHS " & FORMAT(MIN('DimReportingPeriod'[Reporting Period]),"mmmm yyyy") & " TO " & FORMAT(MAX('DimReportingPeriod'[Reporting Period]),"mmmm yyyy")

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , have you tried this -Title Sub Report = "CURRENTLY VIEWING MONTHS " & format(MIN('DimReportingPeriod'[Reporting Period]),"mmmm yyyy") & " TO " & format(MAX('DimReportingPeriod'[Reporting Period]),"mmmm yyyy")

Fowmy
Super User
Super User

@Anonymous 

You can put it this way as well:

Title Sub Report = "CURRENTLY VIEWING MONTHS " & FORMAT(MIN('DimReportingPeriod'[Reporting Period]),"mmmm yyyy") & " TO " & FORMAT(MAX('DimReportingPeriod'[Reporting Period]),"mmmm yyyy")

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Faaabulous I didn't realise you could use FORMAT in this way, I will for sure be using it again! Thanks so much @Fowmy 

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.