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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help to verify the script result If( Mod(Num(Month(AddMonths(MonthEnd(Today()), -1))),3) = 0, 1, 0)

Please kindly help me to verify the result of this script.

 

LET RunQuarterly = If( Mod(Num(Month(AddMonths(MonthEnd(Today()), -1))),3) = 0, 1, 0);

 

Thank you very much in advanced.

2 Replies
tresesco
MVP
MVP

The code returns 1 if last month is a multiple of 3 else 0. However, the same can be achieved with a little simpler expression (removing few unnecessary functions), like:

LET RunQuarterly = If( Mod(Month(MonthEnd(Today(), -1)),3) = 0, 1, 0);

agni_gold
Specialist III
Specialist III

What exactly you want to do ?