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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

two weeks intervalMap

I´m trying to make a 2 week interval, but having trouble.

I use this but doeent work

InterlvaMap:

Mapping Load * inline[

key, label

1, 1-2

2, 3-4

3, 5-6

.................and so on

]

;

MAP label USING IntervalMap

Load

weeknumber as label

I got a field weeknumber

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You are mapping week 1 to '1-2' and 2 to '3-4' etc. where I believe both week numbers should be mapped to '1-2'

IntervalMap:

MAPPING LOAD * INLINE [

key, twoweeks

1, 1-2

2, 1-2

3, 3-4

4, 3-4

]

;

View solution in original post

16 Replies
sushil353
Master II
Master II

Try this:

InterlvaMap:

Mapping Load * inline

[

key, label

1, 1-2

2, 3-4

3, 5-6

];

Map weekno using InterlvaMap;

tab1:

LOAD * Inline

[

weekno

1

2

3

];

sushil353
Master II
Master II

MAP label USING IntervalMap

Check your spelling with mapping table

InterlvaMap and USING IntervalMap

Not applicable
Author

firstly

you make interval by this syntax for week.

class(sum(week),1).

then try mapping

Not applicable
Author

Hi

class(sum(week),1).

do?

Please write some of the script.

What I´m trying to gain by the 2 weeks interval, - is how many items sold per first 2 weeks, second 2 weeks - third

2 weeks...... and so on

Not applicable
Author

My spelling in the script is ok - sorry for wrong spelling here

Not applicable
Author

the above post use for making Interval.

If your interval are already hard coaded. then try this,

InterlvaMap:

Mapping Load * inline

[

key, label

1, 1-2

2, 3-4

3, 5-6

];

Map weekno using InterlvaMap;

tab1:

LOAD * Inline

[

weekno

1

2

3

];

what exactly want the ouput Explain?

Not applicable
Author

I have already tried but it does nothing??

Not applicable
Author

My script now looks like this

IntervalMap:

Mapping Load * inline

[

key, label

1, 1-2

2, 3-4

3, 5-6

];

Map weekno using IntervalMap;

tab1:

LOAD * Inline

[

weekno

1

2

3

];

load weeknumber as twoweeks

resident [tab1];

so good so far - I can make a field twoweeks, but it doesnt filter with the rest of the datafields???

sushil353
Master II
Master II

Check the table viewer.. ctrl+T.. 

check if the table is linked with the other tables or not..

if not. then try to rename the field in such a way so that they can link with the other tables.

HTH

Sushil