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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count serial no?

Hi team,

i have three fields

Input

DeptName     Serial no               Dowanlod Date

1                     10                      12-08-2000

1                     11                       12-09-2000

2                     12                        13-04-2004

2                      13                        13-04-2005

2                      14                        12-08-2001

3                      34                        07-09-2004

Now i want  first download date of count of Serial no

out put

DeptName     Serial no               Dowanlod Date

1                      1                      12-08-2000

2                      1                      13-04-2004

3                      1                       07-09-2004

4 Replies
Sokkorn
Master
Master

Hi,

If you want via load script then try

[TableName]:

Load

     DeptName,

     1     AS [Serial no],

     Min([Dowanlod Date])     AS [Dowanlod Date]

From [Source] Group by DeptName;

If you want via QlikView object

1. Create Straight Table with

     a. Dimension: DeptName

     b. Two Expression

          =Min([Dowanlod Date]) ==> User Label as [Dowanlod Date]

          =1 ==> User label as [Serial no]

Regards,

Sokkorn

er_mohit
Master II
Master II

See the attached file

Not applicable
Author

this is the code according to your answer.

i have no exel data, so we take as inline load, so you can change .

tab12:

LOAD * INLINE [

    DeptName, Serial no, Dowanlod Date

    1, 10, 12-08-2000

    1, 11, 12-09-2000

    2, 12, 13-04-2004

    2, 13, 13-04-2005

    2, 14, 12-08-2001

    3, 34, 07-09-2004

];

LOAD DeptName as DetpName_new,  

if(Previous(DeptName)<>DeptName,1,RangeSum(1,peek(serial))) as serial,

[Dowanlod Date] as [Dowanlod Date new]

Resident tab12;

drop Table tab12;

***************************************

now  take a pivote chart

dimension1- DetpName_new

dimension2- serial

expression- 
if(serial =1, [Dowanlod Date new])

then output like this

DetpName_newserialif(serial =1, [Dowanlod Date new])
1112-08-2000
2113-04-2004
3107-09-2004
Not applicable
Author

HI

if your problem resolved then marked it as either correct or helpful according to your question so that it might be helpful for other developer

Regards

vishwaranjan