Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Double data

Hello everybody

I’ve got a problem. Some data are double. I’ve some articles with more than one picturepath. Now i would like to aggregate them in the script. I only want to show these pictures with the highest picturenumber like max(bildnummer)

How should i do that in the script?

The actual script looks like this:

Bilder_temp:

LOAD subfield(bildname, ' ', 1) as key_Artikel ,

      bildnummer,

   

     mandid,

     bildtyp,

     anwendung,

     replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\') as servername,

     pfad,

     (replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\')&pfad) as AnzeigePfad,

     bildname,

     beschreibung,

     subfield(bildname, ' ', 1) as ArtikelNr

FROM

B:\Produktiv\01_Extract\03_QVD\bilder.qvd

(qvd)

where mandid = 'DM';

i'm a beginner in scripting 🙂 Thx for your Help

cheers

marco

1 Solution

Accepted Solutions
fernando_tonial
Partner - Specialist
Partner - Specialist

Sorry, i change tha name of the first table

instead

Bilder_temp

to

Bilder


Or


Inner Join (Bilder_temp) 

LOAD   

  Max(bildnummer) as bildnummer,   

  key_Artikel 

Resident Bilder_temp

Group By   

  key_Artikel;

Don't Worry, be Qlik.

View solution in original post

9 Replies
its_anandrjs

Check the raw QVD bilder.qvd for duplicate in another application and cross check weather there is always duplicate records in the QVD or not then go further.

MK_QSL
MVP
MVP

Can you provide sample data in excel or in your sample qvw?

Not applicable
Author

here is an example. In Row L you see the picture number. I only want to see the line with the highest number.

fernando_tonial
Partner - Specialist
Partner - Specialist

Hi, try this.

Bilder_temp:

LOAD subfield(bildname, ' ', 1) as key_Artikel ,

      bildnummer,

     mandid,

     bildtyp,

     anwendung,

     replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\') as servername,

     pfad,

     (replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\')&pfad) as AnzeigePfad,

     bildname,

     beschreibung,

     subfield(bildname, ' ', 1) as ArtikelNr

FROM

B:\Produktiv\01_Extract\03_QVD\bilder.qvd

(qvd)

where mandid = 'DM';

Bilder:

Noconcatenate

LOAD

     Max(bildnummer) as bildnummer,

     key_Artikel ,

     mandid,

     bildtyp,

     anwendung,

     servername,

     pfad,

     AnzeigePfad,

     bildname,

     beschreibung,

     ArtikelNr

Resident Bilder_temp

Group By

     key_Artikel ,

     mandid,

     bildtyp,

     anwendung,

     servername,

     pfad,

     AnzeigePfad,

     bildname,

     beschreibung,

     ArtikelNr;


Drop Table Bilder_temp;

Best Regards.

Tonial.

Don't Worry, be Qlik.
Not applicable
Author

dont work 😞 i'll upload you the qvd and the application. my test article is 11229. Sorry for that, but i have no idea in scripting 🙂

thank you verry much for your help 🙂

fernando_tonial
Partner - Specialist
Partner - Specialist

ok, try this.

Bilder: 

LOAD

  subfield(bildname, ' ', 1) as key_Artikel , 

  bildnummer, 

  mandid, 

  bildtyp, 

  anwendung, 

  replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\') as servername, 

  pfad, 

  (replace(servername, 'N:\', '\\DM-W2-02\Bilddatenbank\')&pfad) as AnzeigePfad, 

  bildname, 

  beschreibung, 

  subfield(bildname, ' ', 1) as ArtikelNr 

FROM 

  bilder.qvd (qvd) 

where mandid = 'DM'; 

Inner Join (Bilder)

LOAD 

  Max(bildnummer) as bildnummer, 

  key_Artikel

Resident Bilder

Group By 

  key_Artikel;

Best Regards.

Tonial.

Don't Worry, be Qlik.
Not applicable
Author

Hi Fernando

Thank your for your help!! Awesome!!

There is an error in the Inner Join part. Do you have an idea?error.png

Table not found

Inner Join (Bilder)

Max(bildnummer) as bildnummer,

...

...

fernando_tonial
Partner - Specialist
Partner - Specialist

Sorry, i change tha name of the first table

instead

Bilder_temp

to

Bilder


Or


Inner Join (Bilder_temp) 

LOAD   

  Max(bildnummer) as bildnummer,   

  key_Artikel 

Resident Bilder_temp

Group By   

  key_Artikel;

Don't Worry, be Qlik.
Not applicable
Author

Hi Fernando

Thank you verry much. It works now!! Perfect.

Voucher for a beer 🙂