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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
shiveshsingh
Master
Master

Error in Creating Calender

A bit silly but can anyone help in getting what's wrong with below script. I only want to use rowno()

let vMIN = num(AddYears(YearStart(Today()),-1));

let vMAX= num(YearStart(Today()));

Calender:load

Date($(vMIN)+RowNo()+1) as Temp_Date

AutoGenerate

$(vMIN)+RowNo()< $(vMAX);

Labels (1)
4 Replies
shilpan
Partner Ambassador
Partner Ambassador

Try this:

let vMIN = num(AddYears(YearStart(Today()),-1));


let vMAX= num(YearStart(Today()));


Calender:


load


Date($(vMIN)+RowNo()+1) as Temp_Date


AutoGenerate($(vMAX) - $(vMIN) + 1);

tresB
Champion III
Champion III

And the vMin could be simplified using yearstart() parameter perhaps like:

let vMIN = num(YearStart(Today(),-1));

shiveshsingh
Master
Master
Author

Thanks

shiveshsingh
Master
Master
Author

Got it, thanks