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: 
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],