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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

First Value


Hi,

I have a week that is mapped to two periods.

For eg: 2014 W18 is mapped to both 2014 April and 2014 May.(5 days in April and 2 days in May)

But I would like to have2014 April to be mapped for 2014 W18.

Could anyone help me to get the logic.

Thanks &regards,

Vinitha

4 Replies
Anonymous
Not applicable
Author

place me the sample application

Then we can understand easily..

CELAMBARASAN
Partner - Champion
Partner - Champion

How you are creating the week?

Post your script on creating this calendar and the sample app. we need to be little bit clear in understanding this

Anonymous
Not applicable
Author

Hi,

I believe, you already have calendar table with weekno and dates and you are mapping weekno to your transaction table. Try using WeekStart function.

=MonthName(WeekStart(Date))

Thanks

hic
Former Employee
Former Employee

If your week is defined by Week(Date), then Month(Date) will always return 'May' for the last days of that week.

However, if you instead define Month as

     Month(WeekStart(Date)) as Month

then it will work the way you want.

HIC