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: 
microwin88x
Creator III
Creator III

Solved

Solved

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

Table:

LOAD ACCOUNT,

    ACTIVITY,

    GROUP1,

    GROUP2

FROM

[https://community.qlik.com/thread/218639]

(html, codepage is 1252, embedded labels, table is @1);

Link:

LOAD Distinct *;

LOAD *,

  If(ACTIVITY = '2XX', 199 + IterNo(),

  If(ACTIVITY = '3XX', 299 + IterNo(), ACTIVITY)) as ACTIVITY_LINK

Resident Table

While IterNo() <= 100;

DROP Table Table;

Left Join(Link)

LOAD ACCOUNT,

    ACTIVITY as ACTIVITY_LINK,

    AMOUNT

FROM

[https://community.qlik.com/thread/218639]

(html, codepage is 1252, embedded labels, table is @2);

FinalTable:

LOAD ACCOUNT,

  ACTIVITY,

  GROUP1,

    GROUP2,

    Max(AMOUNT) as AMOUNT

Resident Link

Group By ACCOUNT, ACTIVITY, GROUP1, GROUP2;

DROP Table Link;

Capture.PNG

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

Like this?

Table:

LOAD ACCOUNT,

     ACTIVITY,

     GROUP1,

     GROUP2

FROM

[https://community.qlik.com/thread/218639]

(html, codepage is 1252, embedded labels, table is @1);

Link:

LOAD Distinct *;

LOAD *,

  If(ACTIVITY = '2XX', 199 + IterNo(),

  If(ACTIVITY = '3XX', 299 + IterNo(), ACTIVITY)) as ACTIVITY_LINK

Resident Table

While IterNo() <= 100;

DROP Table Table;

FACT:

Right Keep (Link)

LOAD ACCOUNT,

     ACTIVITY as ACTIVITY_LINK,

     AMOUNT

FROM

[https://community.qlik.com/thread/218639]

(html, codepage is 1252, embedded labels, table is @2);


Capture.PNG

microwin88x
Creator III
Creator III
Author

Thank you Sunny T!

Is there any way to omit those values for example Rows 4/5/12/etc?

Because those are amounts that I not need.

sunny_talwar
MVP
MVP

Try this:

Table:

LOAD ACCOUNT,

    ACTIVITY,

    GROUP1,

    GROUP2

FROM

[https://community.qlik.com/thread/218639]

(html, codepage is 1252, embedded labels, table is @1);

Link:

LOAD Distinct *;

LOAD *,

  If(ACTIVITY = '2XX', 199 + IterNo(),

  If(ACTIVITY = '3XX', 299 + IterNo(), ACTIVITY)) as ACTIVITY_LINK

Resident Table

While IterNo() <= 100;

DROP Table Table;

Left Join(Link)

LOAD ACCOUNT,

    ACTIVITY as ACTIVITY_LINK,

    AMOUNT

FROM

[https://community.qlik.com/thread/218639]

(html, codepage is 1252, embedded labels, table is @2);

FinalTable:

LOAD ACCOUNT,

  ACTIVITY,

  GROUP1,

    GROUP2,

    Max(AMOUNT) as AMOUNT

Resident Link

Group By ACCOUNT, ACTIVITY, GROUP1, GROUP2;

DROP Table Link;

Capture.PNG