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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors