Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
LucyN
Partner - Contributor II
Partner - Contributor II

Calculate only the first month of a selected period

Hi,

I have a table of Rates by Rate Dates (Rate Dates= [Rate Date.autoCalendar.YearMonth])

I want to calculate Delta % between the current month and the previous month

Delta= (current month Avg Rate - previous month Avg Rate)/previous month Avg Rate

But I don't want to calculate Delta for the first month of the selected time range (leave it Blank). What should I do?

(In the screenshot, I don't want to calculate Delta % of 2017-Nov)

Capture.JPG

2 Replies
Kushal_Chawda

@LucyN  If your Month field is in proper date format then you can try below expression for %Delta

=if(date(min(total Month),'YYYY-MMM')=Month, null(), %DeltaExpression)

LucyN
Partner - Contributor II
Partner - Contributor II
Author

Hi Kush,

Thanks for your response. It didn't work quite well (it's may be because my Month field format). 

This is my data set (the data goes from 11/01/2017 to 11/01/2019)

Qlik Question-Data table.JPG

This is what I'm trying to achieve.

Qlik Question - Pivot table.JPG