Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the month by passing a specific week as parameter in expression.

Hello All,

I have just started working on QV.

I am stuck at one place. I need to get the month for a specific week.

The expression I am using here is

" =month(week(today())-1)"

it returns me January as month which is incorrect, it should return March.

Any help on this would be deeply appreciated.

Thanks,

Punit

1 Solution

Accepted Solutions
maxgro
MVP
MVP

try with

Month(makeweekdate(Year, WeekNum))

from online help

MakeWeekDate(YYYY [ , WW [ , D ] ] )

Returns a date calculated from the year YYYY, the week WW and the day-of-week D.

If no day-of-week is stated, 0 (Monday) is assumed.

View solution in original post

2 Replies
maxgro
MVP
MVP

try with

Month(makeweekdate(Year, WeekNum))

from online help

MakeWeekDate(YYYY [ , WW [ , D ] ] )

Returns a date calculated from the year YYYY, the week WW and the day-of-week D.

If no day-of-week is stated, 0 (Monday) is assumed.

Not applicable
Author

Thank you Massimo!!

It solved my problem.