Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
14.08. | Value Hero | 383,52 |
Hi there,
i am new to qlikview and i hope anybody can help me again.
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 Hero | 383,52 |
16.08. | Value Hero | 383,52 |
17.08. | Value Hero | 383,52 |
18.08. | Value Hero | 383,52 |
19.08. | Value Hero | 383,52 |
20.08. Value Hero 383,52 Thanks and best regards, Sabrina |
Hallo Sabrina,
one possible solution could be:
tabTemp:
LOAD * FROM [http://community.qlik.com/servlet/JiveServlet/download/662458-138544/Mappe2.xlsx] (ooxml, embedded labels, table is Tabelle1);
RENAME Field Start_Datum to Start;
NoConcatenate
tabSales:
LOAD Date(Start+IterNo()-1) as Start_Datum,
*
While IterNo()<=Days or IterNo()=1;
LOAD *,
Previous(Start)-Start as Days
Resident tabTemp
Order By Start desc;
DROP Table tabTemp;
DROP Field Start;
hope this helps
regards
Marco
if you want to restrict the copies to specific field values, you could try like:
tabTemp:
LOAD * FROM [http://community.qlik.com/servlet/JiveServlet/download/662458-138544/Mappe2.xlsx] (ooxml, embedded labels, table is Tabelle1);
RENAME Field Start_Datum to Start;
NoConcatenate
tabSales:
LOAD Date(Start+IterNo()-1) as Start_Datum,
*
While IterNo()<=Days and Art='Value Hero' or IterNo()=1;
LOAD *,
Previous(Start)-Start as Days
Resident tabTemp
Order By Start desc;
DROP Table tabTemp;
DROP Field Start;
hope this helps
Gruß
Marco
Hi,
its always the next 6 dates:
Excel Row: 12.08.2014 555,55
To load: 13.08.2014 555,55
14.08.2014 555,55
15.08.2014 | 555,55 |
16.08.2014 | 555,55 |
17.08.2014 | 555,55 |
18.08.2014 | 555,55 |
Thanks!!!!
Hi Marco,
thank you so much for your help!
I dont have to fill all the lines until a new "Art", but only the next 6 rows (fields) after a Value Hero.
Any idea how to implement this to your code?
Best regards,
Sabrina
While IterNo()<=RangeMin(6,Days) and Art='Value Hero' or IterNo()=1;
if(isnull(tmpArt), Peek(newtmpArt),tmpArt) as newtmpArt,
if(tmpArt='ValueHero',0,Rangesum(Peek(Counter),1)) as Counter,
if(peek(newtmpArt)='ValueHero' and Peek(Counter)<6,Peek(tmpTeilUmsatz),tmpTeilUmsatz) as tmpTeilUmsatz