Forum Discussion

timknox's avatar
timknox
Helper II
7 years ago
Solved

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

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi,

     

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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

     

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