Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cristianj23a
Partner - Creator III
Partner - Creator III

Dates per fortnight

Hi guys.

I have the following case.

In the company where I do the project, they make payments every fortnight and end of the month. Then you have to create a filter by fortnight and end of month. Example.

Captura.PNG

I made an example to get fortnights but since the months do not have exactly 30 days, it does not work. Examples.

Captura.PNG

As shown in the image, filter the year 2017 and fortnight 27, should show the days 16 to 31 and in the fortnight 26 should show the days 1 to 15.

Please help me with this topic.

I attach the qvw.

Greetings.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
1 Solution

Accepted Solutions
sunny_talwar

May be try this

AutoNumber(Month(Date)&If(Day(Date) <= 15, 1, 2)) as Fortnight_New,

View solution in original post

4 Replies
sunny_talwar

May be try this

AutoNumber(Month(Date)&If(Day(Date) <= 15, 1, 2)) as Fortnight_New,

olivierrobin
Specialist III
Specialist III

hello

I would try this :

SET Fortnight = if(day($1)<=15,(month($1)-1)*2+1,month($1)*2);

cristianj23a
Partner - Creator III
Partner - Creator III
Author

thank you Sunny.

regards.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
cristianj23a
Partner - Creator III
Partner - Creator III
Author

thank you Olivier.

that code also works.

regards.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.