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: 
subbareddykm
Creator II
Creator II

Issue

Hai all good eve to all,

i have one requirement,Can any any one tell me how to do this in backend .

Please find below attchment for reference.I want new field like screenshot

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

DATA:

LOAD Project,

    [Sub Project]

FROM

[ACCUMILATION.xlsx]

(ooxml, embedded labels, table is Sheet1);

FinalTable:

LOAD *,

    If(Project = Peek('Project'), RangeSum(Peek('NewField'), 1), 1) as NewField

Resident DATA

Order By Project;

DROP Table DATA;

Capture.PNG

View solution in original post

10 Replies
Anonymous
Not applicable

do like this?

Load * inline

[Project, Subproject, NewField

A,1234, qwe

A, 2345, fgh

and so on....

];

sunny_talwar
MVP
MVP

May be try this:

Table:

LOAD Project,

          Sub Project

FROM Source;

FinalTable:

LOAD *,

          If(Project = Peek('Project'), RangeSum(Peek('NewField'), 1), 1) as NewField

Resident Table

Order By Project;

DROP Table Table;


UPDATE: Missed a single quote after Project field within Peek

avinashelite
MVP
MVP

what's you requirement ?? you want to create a table in the script ??

could you please explain your requirement

sunny_talwar
MVP
MVP

I am assuming that it is to create the NewField in the image , But I may very well be wrong here

avinashelite
MVP
MVP

No , Bro ..I think that might be the requirement ... lets wait for the reply

subbareddykm
Creator II
Creator II
Author

Sunny,

what i want is my output field is New Field.How to acheive that ?

avinashelite
MVP
MVP

did you check the previous post by Sunny ??

sunny_talwar
MVP
MVP

Try this:

DATA:

LOAD Project,

    [Sub Project]

FROM

[ACCUMILATION.xlsx]

(ooxml, embedded labels, table is Sheet1);

FinalTable:

LOAD *,

    If(Project = Peek('Project'), RangeSum(Peek('NewField'), 1), 1) as NewField

Resident DATA

Order By Project;

DROP Table DATA;

Capture.PNG

vikasmahajan
MVP
MVP

HTH

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.