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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Thabang231
Contributor III
Contributor III

Creating Reporting Period

Hi Team,

 

I would like your assistance I have a field called Date with format 2024/05/26 as e.g. and I would like to create a new field in the load editor using this current field to give me values:

July 2023 - June 2024

July 2024 - June 2025

July 2025 - June 2026, this values will then be in the filter in the front end to be selected. 

 

Your help is appreciated, thanks in advance

 

Regards

 

 

Labels (1)
1 Solution

Accepted Solutions
Qrishna
Master
Master

try below:

Data:
Load Date#(Date, 'YYYY/MM/DD') as Date,
Num(Date#(Date, 'YYYY/MM/DD')) as DateNum,
Year(Num(Date#(Date, 'YYYY/MM/DD'))) as Yr;
Load * inline [
Date
2024/05/26
];

left join(Data)
d:
load Date,
Text(Month(AddMonths(DateNum, 2)) & ' ' & (Yr + IterNo()-2) & ' - ' & Month(AddMonths(DateNum, 1)) & ' ' & (Yr + IterNo()-1)) as Filter
resident Data
while IterNo() <= 3;


drop field DateNum, Yr;

exit script;

 

2491042 - Creating Reporting Period (1).PNG

View solution in original post

1 Reply
Qrishna
Master
Master

try below:

Data:
Load Date#(Date, 'YYYY/MM/DD') as Date,
Num(Date#(Date, 'YYYY/MM/DD')) as DateNum,
Year(Num(Date#(Date, 'YYYY/MM/DD'))) as Yr;
Load * inline [
Date
2024/05/26
];

left join(Data)
d:
load Date,
Text(Month(AddMonths(DateNum, 2)) & ' ' & (Yr + IterNo()-2) & ' - ' & Month(AddMonths(DateNum, 1)) & ' ' & (Yr + IterNo()-1)) as Filter
resident Data
while IterNo() <= 3;


drop field DateNum, Yr;

exit script;

 

2491042 - Creating Reporting Period (1).PNG