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: 
madhubabum
Creator
Creator

How to delete Negative months in Master Calendar

Hi all

I have the following Scenario ...

Calendar.png

if(Year(tmp_Date)=WeekYear(tmp_Date), Week(tmp_Date) - Week(MonthStart(tmp_Date)) + 1,  Week(tmp_Date) + 52 - Week(MonthStart(tmp_Date)) + 1) AS [Week in Month], 

How can i delete Negative Months in master calendar.

Thanks

Madhu

1 Reply
sunilkumarqv
Specialist II
Specialist II

Try this

if(Year(tmp_Date)=WeekYear(tmp_Date), Week(tmp_Date) - Week(MonthStart(tmp_Date)) + 1,  Week(tmp_Date) - Week(MonthStart(tmp_Date)) + 1) AS [Week in Month],