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: 
Prabhu1204
Creator
Creator

Fisical Year Condition

Hello All

i am developing a app and I ma  using the below condition

IF(SALEDATE>DATE(2020,4,1),"Yes","No").. next year the year should be 2021. the date and month should be the same

How to use variables for this

-Prabhu
1 Solution

Accepted Solutions
MayilVahanan
MVP
MVP

HI @Prabhu1204 

Its my mistake, its MakeDate() 

=IF([PAB/PRB Date]>MakeDATE(Year(Today(1)),4,1),'Yes','No')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

5 Replies
MayilVahanan
MVP
MVP

Hi @Prabhu1204 

IF(SALEDATE>DATE(Year(Today(1)),4,1),"Yes","No")
- It will gives 2020 now, next year, it will give 2021.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Prabhu1204
Creator
Creator
Author

I tried and it shows error in expression. Am i doing anything wrong 

=IF([PAB/PRB Date]>DATE(Year(Today(1)),4,1),'Yes','No')

-Prabhu
MayilVahanan
MVP
MVP

HI @Prabhu1204 

Its my mistake, its MakeDate() 

=IF([PAB/PRB Date]>MakeDATE(Year(Today(1)),4,1),'Yes','No')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Prabhu1204
Creator
Creator
Author

@MayilVahanan Thanks a ton .. Is it necessary to give Year(today(1) or it can be year(today())

-Prabhu
MayilVahanan
MVP
MVP

Hi @Prabhu1204 

You can use Year(Today()) also. 

FYR:

https://community.qlik.com/t5/QlikView-App-Development/Today-v-Now/td-p/191765

https://community.qlik.com/t5/Qlik-Design-Blog/The-Now-amp-Today-Functions/ba-p/1518108#:~:text=Now(....

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.