Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik_Developer1
Contributor II
Contributor II

Create month for each record

Hi

I have 3 records in data like below and want to add subsequent months like  next there months Jun jul aug

Rowno   Qty

1.   10

2 .  20

3.   30

 

Output

Rowno Qty date

1. 10  Jun21

2. 20 Jul21

3. 30 Aug21

5 Replies
Or
MVP
MVP

It isn't clear what exactly you're trying to do here. What's the logic for determining these months?

Qlik_Developer1
Contributor II
Contributor II
Author

Simply I want to add future months for each record 

Or
MVP
MVP

How do you determine which month to add to which record?

If it's just three records, and you always want the upcoming three months...

Load Rowno, Qty, AddMonths(MonthStart(Today()),Rowno) as date

Resident YourTable;

 

Qlik_Developer1
Contributor II
Contributor II
Author

Nothing is coming only blank
mato32188
Specialist
Specialist

Hi @Qlik_Developer1 ,

if you want to have just dummy dates beginning at Jun 2021, you can try this:

dummy:
Load
*,
Month &'-'& Year as QtyDate;
Load
*,
floor(((2021*12+5+Row)-1)/12) as Year,
Replace(Num(Mod((2021*12+5+Row),12),'00'),00,12) as Month

Inline [
Row, Qty
1,10
2,20
3,30
4,40
5,50
6,60
7,70
8,80
9,90,
10,100
11,110
12,120
13,130
14,140
15,150
16,160
17,170
18,180
19,190
20,200
];

to get this:

mato32188_0-1620220576273.png

 

BR

m

ECG line chart is the most important visualization in your life.