Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variables

Hello,

I need to create a chart that has the following data, 'Current Week, 'Previous Week' and 'Next Week'. I have been able to create a simple variable for the current week and can do the same for previous and next week however I want the user to simply type into an Input Box the current week and then this will in turn show the previous and next weeks worth of data. e.g.

Week 1 - 5

Week 2 - 6

Week 3 - 9

Week 4 - 16

Week 5 - 3

So if the used typed in Week 3 into the Input Box I want them to see Week 2 (Previous Week), Week 3 (Current Week) and Week 4 (Next Week). Unless I have missed something I can't figure this one out.

Thanks,


Ralph

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Try with this..

Sum({<Week={$(=vInput),$(=(vInput+1)),$(=(vInput-1))}>} Sales)

View solution in original post

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Try with this..

Sum({<Week={$(=vInput),$(=(vInput+1)),$(=(vInput-1))}>} Sales)

Vegar
MVP
MVP

Try this.

sum({<Week = {$(=w-1)}>}Amount)

sum({<Week = {$(w)}>}Amount)

sum({<Week = {$(=w+1)}>}Amount)

See my attached file

Best regards

Vegar Lie Arntsen

QlikView consultant at egbs consulting ab

Blog (in Swedish): bi-effekten.se

Not applicable
Author

Brilliant, thanks again,

Ralph

Not applicable
Author

Try something like this.