Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
MindaugasBacius
Partner
Partner

Date intervals

Hello,

Need some help with creating date intervals.

Data:

Screenshot_2.jpg

The result wanted:

Screenshot_3.jpg

The example attached.

Thank you in advance!

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Check attached app, need to create a flag in script

DateIntervals.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

7 Replies
vinieme12
Champion III
Champion III

what is the logic here?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
its_anandrjs

Try this way


Table:
LOAD * INLINE [
A, F2, Date
A, 1, 2017.01.01
A, 1, 2017.01.02
A, 1, 2017.01.03
A, 2, 2017.01.04
A, 1, 2017.01.05
A, 1, 2017.01.06
B, 3, 2017.01.01
B, 4, 2017.01.02
]
;


Left Join(Table)
LOAD
F2,
Max(Date) as Maxdate,
Min(Date) as MinDate
Resident Table
Group By F2;

MindaugasBacius
Partner
Partner
Author

Same fields A and F2 need to have aggregated min and max values.

Screenshot_3.jpg

The order of the Date is critical here.

Rows 2-3-4 and 6-7 have the same data A 1 but according to the Date field there have to be different Min and Max dates.

MindaugasBacius
Partner
Partner
Author

Unfortunately, this model cannot be applied as we have data like this:

Screenshot_3.jpg

vinieme12
Champion III
Champion III

Check attached app, need to create a flag in script

DateIntervals.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
its_anandrjs

Ok but how you differentiate the 6,7 rows that has values same but different dates in this case max will be 2001.01.06 and min 2017.01.01.

MindaugasBacius
Partner
Partner
Author

I was so stuck with solving this issue in back end that I have forgotten an easy front end solution.

Thank you!