Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rdsuperlike
Creator
Creator

what if data shift

I want to get the below data to shift to +- (1 to 5 )days through a wat if slider

Date       total

1/1/15   100

1/2/15    35

1/3/15     45

1/4/15    36

1/5/15    67

1/6/15    37

1/7/15     58

If i move by +1 days

OUTPUT should be

Date       total

1/1/15     -

1/2/15    100

1/3/15     35

1/4/15    45

1/5/15    36

1/6/15    67

1/7/15     37

1/8/15   58

Any approach is appreciated?

I used above. But couldnt get the corner cases.

eg: 1/8/15 58

7 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw.


talk is cheap, supply exceeds demand
rdsuperlike
Creator
Creator
Author

you manually added the dates in the script.

I dont want that. I wanted it to be calculated on the fly.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Good luck then. You'll need it.


talk is cheap, supply exceeds demand
sunny_talwar

To generate automatic dates, you can use this:

Table:

LOAD * INLINE [

sno, no

12/24/2014

12/25/2014

12/26/2014

12/27/2014

12/28/2014

12/29/2014

12/30/2014

12/31/2014

01/01/2015,20

01/02/2015,578

01/03/2015,344

01/04/2015,54

01/05/2015,34

01/06/2015,37

01/07/2015,38

01/08/2015,58

];

MaxDate:

LOAD Max(sno) as MaxSno

Resident Table;

LET vMaxSno = Peek('MaxSno');

DROP Table MaxDate;

Concatenate(Table)

LOAD Date($(vMaxSno) + RecNo(), 'MM/DD/YYYY') as sno,

  '' as no

AutoGenerate 5;

maksim_senin
Partner - Creator III
Partner - Creator III

Hi,

At the model level all the value stay linked with the corresponding dates, so you'll deffinitely need a calculated dimension which should add the user selected difference.

Best regards,

Maxim

Not applicable

Hi Maxim,

I am in need of you, plz help me. i have 3 docs can any one plz help me creating 2 reports from that.can u plz help me to create reports , i have specs of the reports

maksim_senin
Partner - Creator III
Partner - Creator III

Hi,

Please post QVW with sample data, that would faster the process.

Best regards,

Maxim