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

Grouping Data

Hi , 

 

I need to implement the below scenario in qlikview. Can anyone please help ? 

 

from the first table,  I need to group the records based on client count column. 

then if the sourcesystem='Bermuda' then the programtype and markedcode values should overide based on the Sourcessystem=US records 

There should not be any change to the US sourcesystem records . 

I have given the before and after sample data below .

Image.png

Can anyone please help me in this ?

Thanks

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try something like below. The inline load is just an example. You can replace it with a from ...somewhere.... to load the date from a file or database.

Before:

LOAD *, RowNo() as rowid INLINE [

    sourcesystem, client count, marketed, program_type, premium

    US, A, N, LS, 100

    US, B, N, GC, 200

    Bermuda, A, Y, NA, 100

    Bermuda, A, Y, NA, 100

    US, B, N, GC, 200

    Bermuda, B, Y, NA, 100

];

 

After:

load rowid, sourcesystem, [client count], premium

Resident Before;

join

load distinct [client count], marketed, program_type

resident Before where sourcesystem = 'US';

 

drop table Before;


talk is cheap, supply exceeds demand