Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to copy values to next 6 fields of a table

14.08.Value Hero383,52

Hi there,

i am new to qlikview and i hope anybody can help me again.

zzz.jpg

I want to build something like this:

If tmpArt = ValueHero, then copy the value from tmpTeilUmsatz to the next 6 following fields.

i.e.:

14.08.   Value Hero     383,52

15.08.Value Hero383,52
16.08.Value Hero383,52
17.08.Value Hero383,52
18.08.Value Hero383,52
19.08.Value Hero383,52
20.08.  Value Hero 383,52

Thanks and best regards,

Sabrina

15 Replies
MK_QSL
MVP
MVP

Can you please upload the result you are expecting in excel file ?

Not applicable
Author

Mapping1:

mapping load

    Datum,

    Sum(Umsatz)

resident Deals_Liste

group by Datum;

Mapping2:

mapping load

    Datum,

    Art

resident Deals_Liste;

Plattformen_Details:

LOAD Plattform as Plattform,

     PlattformVJ as Plattform_VJ,

     Datum,

     [Artikel Online] as [Artikel Online],        

     if(ApplyMap('Mapping2',Datum) = 'Value Hero', ApplyMap('Mapping1',Datum)/7 ) as Division,

     [Umsatz in € gesamt] ,

     [Verkaufte Artikel] as [Verkaufte Artikel],

     [Umsatz in € gesamt] as [Umsatz in € gesamt],

     DDMM as DDMM

FROM

   

    (ooxml, embedded labels, table is Qlik_2.de);

   

tmpDeals:

LOAD

    Datum,

    if(ApplyMap('Mapping2',Datum) <> 'Value Hero' and  ApplyMap('Mapping2',Datum) <> 'Daily Deal',0,  ApplyMap('Mapping2',Datum)  ) as tmpArt,

if(ApplyMap('Mapping2',Datum) ='Value Hero', ApplyMap('Mapping1',Datum) / 7, 0) as tmpTeilUmsatz

resident Plattformen_Details;

Not applicable
Author

Or do you need the excel file i am loading from?

MK_QSL
MVP
MVP

Your script will not help. Upload the excel file please

Not applicable
Author

Here they are and thanks a lot!!!

Not applicable
Author

Any Idea?

Not applicable
Author

Nobody can help me?

I'm racking my head for the last days and i do not go on. 😞

puttemans
Specialist
Specialist

Hi,

I didn't work out in detail, but roughly maybe this could work :

1/first you only select those lines where the Value= Value Hero

2/then you autonumber the lines you selected

3/then you build a repetition for each line in order to create your dates

For line 1 to x;   

Set a=null();

     For a = 1 to 7;

          Load

          Num#(Date-1)+$(a) as Date;

          Umsatz as Umsatz       

     Next;

Next;

While you make sure to concatenate all lines. I think that should bring you pretty close to your desired result.


simenkg
Specialist
Specialist

You can use the Peek() to do this.

is it allways 6 values or is it allways all the lines until a new tmpArt?

I'm going to assume the last one because it is a little simpler to implement.

Something like this.

Load .

.

.

if(isnull(tmpArt), Peek(newtmpArt),tmpArt) as newtmpArt,

if(peek(newtmpArt)='ValueHero',Peek(tmpTeilUmsatz),tmpTeilUmsatz) as tmpTeilUmsatz


from Table....