Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new one to qlik, i am practicing by using Corona data
Here i would like to do derive new field which is day when cases start and it increment one for every day by date for each country field in back-end.
Please let me know the answer
Hi Siva Krishna,
For a data set like this.
corona:
load * Inline [
Country, date, count
India,01/01/2020,1
India,01/02/2020,2
India,01/03/2020,3
India,01/05/2020,5
India,01/06/2020,7
India,01/07/2020,1
India,01/08/2020,1
India,01/09/2020,1
Singapore,01/11/2020,3
Singapore,01/12/2020,4
Singapore,01/13/2020,1
Singapore,01/14/2020,5
Singapore,01/15/2020,1
Singapore,01/16/2020,2
Singapore,01/18/2020,1
];
You can use following expressions.
date- aggr(nodistinct min(date),Country) --> days Since
rangesum(above(sum(count),0,rowno())) --> Running Total
-Karthik
I would implement it on the visualisation side as a calculated dimension. See attached; you can modify the number of cases with the slider and then the table will update accordingly giving you the required increments (and also filtering the table itself so that it's ready for visualisations)
See below and attached
Hi Siva Krishna,
For a data set like this.
corona:
load * Inline [
Country, date, count
India,01/01/2020,1
India,01/02/2020,2
India,01/03/2020,3
India,01/05/2020,5
India,01/06/2020,7
India,01/07/2020,1
India,01/08/2020,1
India,01/09/2020,1
Singapore,01/11/2020,3
Singapore,01/12/2020,4
Singapore,01/13/2020,1
Singapore,01/14/2020,5
Singapore,01/15/2020,1
Singapore,01/16/2020,2
Singapore,01/18/2020,1
];
You can use following expressions.
date- aggr(nodistinct min(date),Country) --> days Since
rangesum(above(sum(count),0,rowno())) --> Running Total
-Karthik
I would implement it on the visualisation side as a calculated dimension. See attached; you can modify the number of cases with the slider and then the table will update accordingly giving you the required increments (and also filtering the table itself so that it's ready for visualisations)
See below and attached