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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
timknox
Helper II
Helper II

Return a string from a table based on a date

I wonder if anyone can help......

 

I have a table:

 

DateMonthAPIndex
01 April 20184AP 10
01 May 20185AP 21
01 June 20186AP 32
01 July 20187AP 43
01 August 20188AP 54
01 September 20189AP 65
01 October 201810AP 76
01 November 201811AP 87
01 December 201812AP 98
01 January 20191AP 109
01 February 20192AP 1110
01 March 20193AP 1211

 

I have a measure in a different table:

 

Latest Date = MAX('Actuals Data'[Date])

 

The above measure gives me the date: 1/9/18

 

What i need is to be able to extract the corresponding 'AP' - in this case it would be 'AP 6'

 

I will then be using this as a heading in a multi-row card as a title

 

Thanks for any help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

="AP "&IF(MONTH([Latest Date])<4,MONTH([Latest Date])+9,MONTH([Latest Date])-3)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi,

 

="AP "&IF(MONTH([Latest Date])<4,MONTH([Latest Date])+9,MONTH([Latest Date])-3)

many thanks

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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