Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
BI_Rockstar_265
Contributor II
Contributor II

Date Range in filter pane

Hi Team,

I want no of difference months in filter pane.

if my date field is current month then it should show 0(difference of months)

if my date field is current month -1 then it should show 1

 

all these values should reflect in filter pane.

2 Replies
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @BI_Rockstar_265, problably the best way to operate with months is to create a correlative number based on month, so you can make these operations easily and avoid extra logic to manage Dec to Jan transitions. For example:

Year(Today()) * 12 + Month(Today())

-

Year(Max(DateField)) * 12 + Month(Max(DateField))

If you create this field in the script (for example MonthOrder), you will get cleaner expressions in your charts.

JG

BI_Rockstar_265
Contributor II
Contributor II
Author

Hi Juan,

Its not  working  as i mentioned above.