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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ngrunoz
Contributor II
Contributor II

Conditional Numbering AutoNumbering

Hi Guys. I have a situation where I have projects which runs during different time periods and I would want to plot the results of the project on a line chart for comparison. For me to be able to do this I would want the start for each period to be either Week 1 or Day 1 and then start Automatically numbering the time period from that to the end date of the period. How do I create expressions for this type of requirement in the load script?

Example data

   

DATEProjectUnits
03/08/2016Project A50
04/08/2016Project A30
05/08/2016Project A20
06/08/2016Project A40
07/08/2016Project A90
08/08/2016Project A20
09/08/2016Project A15
10/08/2016Project A22
11/08/2016Project A10
12/08/2016Project A100
13/08/2016Project A20
14/08/2016Project A65
15/08/2016Project A77
16/08/2016Project A88
17/08/2016Project A105
06/09/2016Project B120
07/09/2016Project B130
08/09/2016Project B90
09/09/2016Project B70
10/09/2016Project B69
11/09/2016Project B87
12/09/2016Project B39
13/09/2016Project B45
14/09/2016Project B56
15/09/2016Project B60
16/09/2016Project B70
1 Solution

Accepted Solutions
hector_munoz
Specialist
Specialist

OK,

Try the attached app.

Regards,

H

View solution in original post

4 Replies
hector_munoz
Specialist
Specialist

Hi Rungano,

If the result you need is similar to below:

08-03-2017 8-28-11.png

, look at the attached app.

Regards,
H

ngrunoz
Contributor II
Contributor II
Author

Hi Hector

The results that I want is when we start Project B then It start to re-count Day 1 and also week 1.

hector_munoz
Specialist
Specialist

OK,

Try the attached app.

Regards,

H

jonathandienst
Partner - Champion III
Partner - Champion III

Something like this (adapted to suit your load script):

LOAD

  DATE,

  Project,

  Units,

  AutoNumber(DATE, Project) as SequenceByProject

FROM ...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein