Skip to main content

Hi Team,

I have  Date field that contains 01-01-2014 to till now. I need to show below image.

Here 2019 data will come it automatically changes to 2017 & Prior, 2018(Q1,Q2,Q3,Q4),2019(Q1,...)

 

Thanks Much,

Veeru.

7 answers
  1. Jun 12, 2018, 11:16 AM

    Hi Veeru,

     

    Use this:

     

    if YEAR([DATE])<2017

    then '2016 and Prior'

    else str( YEAR([DATE])) + ' Q' + str( DATEPART('quarter', [DATE]))

    END

     

    Please see attached example.

     

    Thanks,

     

    Mavis

0/9000