How to use RowNo() in script to get the WeekN automatically in Qlik App
I have a excel file like below with other fields which is manual entry. My req is to make WeekN to be automatic i,e without the data entry .
I am using the below script -
MakeDate(Year([Today's date]),Month([Today's date]), Day([Today's date])) as _Date,
"COVID +ve patients in ICU",
"COVID +ve patients in ICU ,
"COVID +ve patients in wards ",
"COVID +ve patients in wards"
(ooxml, embedded labels, table is Form1);
RowNo() as WeekN
Resident WeeklyCovidNo1 ;
Drop table WeeklyCovidNo1;
But I am getting like below- each entry with no.
Please kindly assist me with the script - So that WeekN is calculated automatically.
this is woking but it won't work for new year.
It restarted to be week 1. Then 1-52=-51.
Can you help me how to get distinct date and then count the rowno().