Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Saravanan_Desingh

Need it in the front end

Hi,

I have a situation here.

T1:

 

PSAHSF1
P1H1Aq
P2H2Sw
P3H3De

T2:

 

HSVB
H121
H143
H165
H287
H2109
H31211
H31413
H31615

The expected output is:

 

PSAO=V+B
P13
P215
P323

Basically the first occurrence of HS.

I need the logic to be in the front end. Can you please help? Thank you.

1 Solution

Accepted Solutions
6 Replies
sunny_talwar

May be create a field in the script as a flag for first occurrence

T1:

LOAD * INLINE [

    PSA, HS, F1

    P1, H1, Aq

    P2, H2, Sw

    P3, H3, De

];

T2:

LOAD *,

  AutoNumber(RowNo(), HS) as Flag;

LOAD * INLINE [

    HS, V, B

    H1, 2, 1

    H1, 4, 3

    H1, 6, 5

    H2, 8, 7

    H2, 10, 9

    H3, 12, 11

    H3, 14, 13

    H3, 16, 15

];

Capture.PNG

Saravanan_Desingh
Author

Hi Sunny,

Thank you. But I need it in the front end.

I had some limitations, where I could not do changes in the Script in Prod environment.

Do you think of any Set Analysis expression? Thanks.

sunny_talwar

You can try this:

=Aggr(If(RowNo() = 1, Sum(V + B)), HS, V)

But ideally, I would use something other than V which might be uniquely associated with each row. For the sample it works with V.

Capture.PNG

Saravanan_Desingh
Author

Hi Sunny,

One more thing

The Dim is PSA and not HS. Thats the catch here.

sunny_talwar

Its working still

Capture.PNG

Saravanan_Desingh
Author

Thanks Sunny.

This works for me