Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramu_i
Creator II
Creator II

Current month of previous day vs last year of same month of the same day

Hi All,

Scenario 1:

Current month vs previous month 

Current date is  : Dec-6-2021 

Sales vales is    Dec-5-2021 vs Dec-5-2020

If current Date : Jan -11-2022    Then Display the data   ------Jan-10-2022  vs Jan-10-2021

Scenario 2:

Current Quarter vs Previous year of same Quarter

---------------------------------------------------------------------

current quarter is Q4   : Now data is Dec-6-2021  

Then display ----- Oct-1-2021 to Dec-5-2021   vs    Oct-1-2020 vs Dec-5-2021

Scenario 3:

Current Year vs Previous Year

-----------------------------------------------------------------------

Current year is 2021 dec-6 

than display the Jan-1-2021   to Dec-5-2021 vs Jan-1-2020 to Dec-5-2020

 

Thanks Advance 

Ram

 

 

 

 

 

2 Replies
anat
Master
Master

Scenario1 :

v1=date(Today()-1)

v2==AddYears( date(Today()-1),-1)

anat
Master
Master

scenario3:

=YearStart( date(Today()-1))

=date(Today()-1)

=YearStart( AddYears( date(Today()-1),-1))

=AddYears( date(Today()-1),-1)