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: 
wanass123
Contributor III
Contributor III

select Current Month

Formula : 

=if(month(Resolution_Date)=month(today()),'Yes','No')

above formula give me yes for March-2022 , March 2021 , March 2020 .. 

1- I need formula for the current month only yes only with March-2022 

2- I need 2nd formula for last 3 month result should be March-2022, Feb-2022 , Jan-2022 

Please advice . 

Labels (4)
2 Solutions

Accepted Solutions
anat
Master
Master

can u try like can u try like:

=if(month(Resolution_Date)=month(today()) and year(Resolution_Date)=year(today()),'Yes','No')

View solution in original post

Ahamada
Contributor III
Contributor III

Try this:

1- I need formula for the current month only yes only with March-2022:

   =if(MonthName(Resolution_Date)=monthname(today()),'Yes','No')

 

2- I need 2nd formula for last 3 month result should be March-2022, Feb-2022 , Jan-2022 :

  =if(MonthName(Resolution_Date)>=monthname(today(),-2) and MonthName(Resolution_Date)<=monthname(today()) ,'Yes','No')

 

View solution in original post

3 Replies
anat
Master
Master

can u try like can u try like:

=if(month(Resolution_Date)=month(today()) and year(Resolution_Date)=year(today()),'Yes','No')

wanass123
Contributor III
Contributor III
Author

Thank you very much , please what about last 3 months ? 

expected result : March-2022 , Feb-2022 , Jan-2022 

Ahamada
Contributor III
Contributor III

Try this:

1- I need formula for the current month only yes only with March-2022:

   =if(MonthName(Resolution_Date)=monthname(today()),'Yes','No')

 

2- I need 2nd formula for last 3 month result should be March-2022, Feb-2022 , Jan-2022 :

  =if(MonthName(Resolution_Date)>=monthname(today(),-2) and MonthName(Resolution_Date)<=monthname(today()) ,'Yes','No')