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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.