Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tomelmslie
Contributor
Contributor

Calculating a field which filters the app to show only data from the latest reporting month

Hi,

I have been trying to fix this issue for some time now without any luck.

I want to create a field which acts like a filter, in that when I 'select' the filter, only data from the latest reporting month is shown across the app. In effect, this would be a button that operates like a filter.

I have tried the following formulas to calculate the latest reporting month:

max(num(ReportingMonth))

- DATE(ADDMONTHS(MAX([ReportingMonth]),-1),'YYYYMM')

I have tried to create this field as a dimension, measure and variable without success. I have been trying to test the formula by entering it into a table and add in a measure (e.g. sales), expecting to see data only from the last reporting month.

Can anyone help?

Thanks,

Tom

 

3 Replies
Channa
Specialist III
Specialist III

you need to pass it to variable

Channa
tomelmslie
Contributor
Contributor
Author

What do you mean sorry?
Channa
Specialist III
Specialist III

pass this into variable 

- DATE(ADDMONTHS(MAX([ReportingMonth]),-1),'YYYYMM')

 

and add variable in all expressions

Channa