Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sagaraperera
Creator
Creator

VALUE OF BACKWARD MONTH

Dear All,

I want to get a last year month value. it is may this

I selected Year 2016 and month December - I WANT GET A VALUE OF YEAR 2016 AND MONTH OF NOVEMBER VALUE

In this selection i get last year same month value using below

=sum( {$<TRAN_YEAR= {"$(=Only([TRAN_YEAR]-1))"},DESCRIPTION= {'NRP'} >} [Actual])

But  i want to get a last year before month value it may this

Year 2015 and Month November value not a Year 2016 and Month of December Value.


PLEASE USE MY ATTACHMENT AND I WANT GET YELLOW COLOR COLUMN.

I already using Trandatecalender:

LOAD

DAY(TRAN_DATE) AS TRAN_DAY,

DATE(TRAN_DATE) AS TRAN_DATE,

DATE(monthstart(TRAN_DATE), 'MM-YYYY') as MONTH_YEAR,

WEEK(TRAN_DATE) AS TRAN_WEEK,

YEAR(TRAN_DATE) AS TRAN_YEAR,

MONTH(TRAN_DATE) AS TRAN_MONTH

RESIDENT PL;

Please can u help me get a

Year 2015 and Month November value not a Year 2016 and Month of December Value.


Thanking you

sagara

2 Replies
john9inno
Creator
Creator

this will work

sum( {$<TRAN_YEAR= {"$(=Only([TRAN_YEAR]-1))"},TRAN_MONTH= {"$(=Only([TRAN_MONTH]-1))"},DESCRIPTION= {'NRP'} >} [Actual])

Anil_Babu_Samineni

PLEASE USE MY ATTACHMENT AND I WANT GET YELLOW COLOR COLUMN.

I didn't found attached file over here

Please can u help me get a

Year 2015 and Month November value not a Year 2016 and Month of December Value.

From this, Usually it should like below

Sum({<Year = {'$(=Max(Year)-2)'}, Month = {'=$(=Max(Month)-1)'}, DESCRIPTION = {'NRP'}>}Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful