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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
sorrakis01
Specialist
Specialist

WEEK NUMBER IN MONTH

Hi,

I'm using a calculated dimension to Know the number of week in the month.

=if(month(weekend(Fecha))= month(Fecha),Round(div(day(WeekEnd(Fecha)),7)),Round(div(day(Weekend(Fecha,-1)),7))+1)+1

It's works well except the months who start on Monday.

Example: 01/09/2014 returns week 2. (7/7 = 1 +1) = 2

I think that a possibbility it's weekday(MonthStart(Fecha)) = 'lun' (monday) then don't sum 1 but i can't solve it on the sequence.

Any idea to solve it?

Thanks!

JAG

Labels (1)
12 Replies
sorrakis01
Specialist
Specialist
Author

Hola Enrique,

Como siempre Gracias. Pero el ejemplo no es válido ya que si miras el 30/06/2014 lo coge como semana 5 y tendría que ser semana 6.

Usando la función de Rubén en principio me funciona bien.

Saludos y Gracias,

sorrakis01
Specialist
Specialist
Author

Gracias a todos

ecolomer
Master II
Master II

Gracias a ti.

Saludos,

EC