Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

still facing issue-Need urgent help

Hi

andrey.krylov

Jyothish KC

Frank Hartmann

tresesco

i used below logic  it worked fine till yesterday  because it took  current quarter and next three quarters  that is  2018Q4,2019Q1,2019Q2,2019Q3

but today i moved to current quarter as 2019Q1...  but  below logic not changed dynamically  in production still it is showing  2018Q4,2019Q1,2019Q2,2019Q3 only      need urgent help  its production issue..

='=Rank( if(Quarter>=Year(Today())&''Q''&Ceil(Month(Today())/3), -(Left(Quarter,4)*10+Right(Quarter,1))))<5'

Future Data

On Open trigger

7 Replies
soniasweety
Master
Master
Author

My result on open trigger now ... 2019Q1,2019Q2,2019Q3,2019Q4   because my curent quarter 2019Q1

tresesco
MVP
MVP

Do you define your quarter in custom logic in script? Today is 1st Nov, 2018 and that should be in normal calendar 2018Q4. If you have a different logic for quarter, your expression would require some tweaking.

soniasweety
Master
Master
Author

No logic,,,   we are getting the Quarter column from Database directly.. no calendar used in script. 

below is the  criteria.

Q1 - Nov, Dec, Jan

Q2 - Feb, Mar, Apr

Q3 - May, Jun, Jul

Q4 - Aug, Sep, Oct

soniasweety
Master
Master
Author

Hi tresesco  any work around ?

tresesco
MVP
MVP

Do you have date, year and month fields as well in your actual data model? If so, try to share an app with sample data with all such fields.

andrey_krylov
Specialist
Specialist

Hi Sony. As I understood your year starts today and just added 2 months. Not sure but try this

='=Rank( if(Quarter>=Year(AddMonths(Today(), 2))&''Q''&Ceil(Month(AddMonths(Today(), 2))/3), -(Left(Quarter,4)*10+Right(Quarter,1))))<5'

Frank_Hartmann
Master II
Master II

I thought we solved this probleme already in some of your previous threads!

='=Rank(if(Quarter>=if(Month(Today(1))>=11,Year(Now())+1&''Q'' & Ceil((Mod((Month(Today(1))+2),12))/3),

if(Month(Today(1))=10,Year(Now())&''Q'' & Ceil((Mod((Month(Today(1))+12),12))/3),Year(Now())&''Q'' & Ceil((Mod((Month(Today(1))+2),12))/3))) and

Quarter<=if(num(month(Monthstart(Today(1))+12))=1,Year(Now())&''Q'' & Ceil((Mod((Month(Today(1))+9),12))/3),Year(Now())+1&''Q'' & Ceil((Mod((Month(Today(1))+11),12))/3))

,Quarter))<5'

see attached for solution

hope this helps