Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Rahul__FCE
Contributor
Contributor

Trying to create a measure for previous month data

Actually I am trying to create a measure for  pricing based on current month , previous month and same month last year. I have used the following syntaxes :

 

This_month = avg({<Month={$(=Month)}, Year={$(=Year)}>} Unit_Price_KG)

Previous_month = avg({<Month = {"=$(=Month - 1)"}, Year = {"=$(=Year)"}>} Unit_Price_KG)

same_month_last_year = avg({<Month={$(=Month)}, Year={$(=Year-1)}>} Unit_Price_KG)

 

The measure "this_month" and "same_month_last_year" is working. The measure for "Previous_month " is not working and is reflecting the data for the current month.

Labels (1)
2 Replies
anat
Master
Master

Can you bypass Month field in Previous_month metric

Rahul__FCE
Contributor
Contributor
Author

Sorry , I did not understand. Could you please elaborate